strip_newlines Filter

Removes all newline characers from a string.

Parameters

None.

Category

String Filters

Description

Removes all newline (line break) characters from a string.

      {% capture how_it_is_done %}
      This
      is
      how
      we
      do
      it.
      {% endcapture %}
      
      {{ how_it_is_done | strip_newlines }}
      

Output

Thisishowwedoit.