newline_to_br
功能說明
將字串中的換行字元(\n)轉換成 HTML 的 <br /> 標籤。常用於保留使用者輸入文字的換行格式。
語法
{{ 字串 | newline_to_br }}範例
{{ "Hello\nWorld" | newline_to_br }}Hello<br />WorldUpdated 6 months ago
功能說明
將字串中的換行字元(\n)轉換成 HTML 的 <br /> 標籤。常用於保留使用者輸入文字的換行格式。
語法
{{ 字串 | newline_to_br }}範例
{{ "Hello\nWorld" | newline_to_br }}Hello<br />WorldUpdated 6 months ago