class Twig_TokenParser_Spaceless extends Twig_TokenParser
Remove whitespaces between HTML tags.
<pre>
{% spaceless %}
<div>
<strong>foo</strong>
</div>
{% endspaceless %}
{# output will be <div><strong>foo</strong></div> #}
</pre>
Methods
|
setParser(Twig_Parser $parser)
Sets the parser associated with this token parser |
from Twig_TokenParser | |
| Twig_NodeInterface |
parse(Twig_Token $token)
Parses a token and returns a node. |
|
| decideSpacelessEnd(Twig_Token $token) | ||
| string |
getTag()
Gets the tag name associated with this token parser. |
Details
in Twig_TokenParser at line 27
public
setParser(Twig_Parser $parser)
Sets the parser associated with this token parser
at line 34
public Twig_NodeInterface
parse(Twig_Token $token)
Parses a token and returns a node.
at line 45
public
decideSpacelessEnd(Twig_Token $token)
at line 55
public string
getTag()
Gets the tag name associated with this token parser.