Velocity Templates - New Line

后端 未结 6 1177
醉话见心
醉话见心 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 05:00

    Are you using Velocity to generate HTML content? In that case remember that you need to use
    not a newline.

    If you actually want a new line character you just put the actual new line character, i.e. press enter. There is no escape sequences like \n in Velocity.

提交回复
热议问题