newline_to_br

Baklib

发布于:2025-01-02

将所有换行符(\n) 替换为 HTML 的 (<br>) 标签。

输入


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

{{ string_with_newlines | newline_to_br }}

输出



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

提交反馈