strip Filter

Trims whitespace characters (spaces, tabs, newlines) from the beginning and end of a string.

Parameters

None.

Category

String Filters

Description

Removes whitespace characters (space, tab, newline) from the beginning and end of a string.

      {% capture spacey %}
      
      
      Too much space.
      
      
      {% endcapture %}
      
      {{ spacey | strip }}
      

Output

Too much space.