class Liquid::Filters::NewLineToBr

Overview

newline_to_br

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

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

{{ string_with_newlines | newline_to_br }}

Output
Hello
there

Extended Modules

Defined in:

liquid/filters/new_line_to_br.cr

Class Method Summary

Class Method Detail

def self.filter(data : Any, args : Array(Any) | Nil = nil) : Any #

[View source]