Velocity Templates - New Line

后端 未结 6 1186
醉话见心
醉话见心 2021-02-13 04:07

I\'ve been working with Apache\'s Velocity engine and a custom template.
The thing is, that I haven\'t been able to generate a String with the corresponding line breaks. I t

6条回答
  •  花落未央
    2021-02-13 04:44

    It might be easiest to simply use the Velocity EscapeTool.

    See this link: https://velocity.apache.org/tools/releases/2.0/javadoc/org/apache/velocity/tools/generic/EscapeTool.html#getNewline%28%29

    Example Usage: Line Break Here: $esc.newline This is on a new line.

提交回复
热议问题