Skip to content
Log in

newline_to_br - Liquid Filter Reference

On this page

Description

Inserts an HTML line break in front of each newline in a string.

Property Value
Return Type string
Category text

Examples

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

{{ string_with_newlines | newline_to_br }} ```

Output: <br />\nHello<br />\nthere<br />

Was this article helpful?

Was this article helpful?