newline_to_br

在字串中每個換行符號 (\n) 前面插入 HTML 換行符號 (<br />)。

輸入

{% capture string_with_newlines %}
Hello
there
{% endcapture %}

{{ string_with_newlines | newline_to_br }}

輸出



<br />
Hello<br />
there<br />