newline_to_br

Replaces every newline (\n) with an HTML line break (<br>).

Input

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

{{ string_with_newlines | newline_to_br }}

Output

Hello<br />
there<br />