Adding additional test suggested by nikic.

This commit is contained in:
Mark Story
2011-04-05 21:29:38 -04:00
parent 86bc75bfe4
commit ec052b3ae0
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -118,6 +118,7 @@ class Twig_Lexer implements Twig_LexerInterface
$tmpPos = strpos($this->code, $this->options[$type][0], $this->cursor);
if (false !== $tmpPos && $tmpPos < $pos) {
$trimBlock = false;
$append = '';
$pos = $tmpPos;
$token = $this->options[$type][0];
if (strpos($this->code, $this->options['whitespace_trim'], $pos) === ($pos + strlen($token))) {
@@ -28,6 +28,8 @@ Whitespace trimming on tags.
{%- endif -%}
</ul>
after
{{ 5 * '{#-'|length }}
{{ '{{-'|length * 5 + '{%-'|length }}
--DATA--
return array('leading' => 'leading space', 'trailing' => 'trailing tabs', 'mixed' => 'mixed tags', 'both' => 'both')
--EXPECT--
@@ -46,4 +48,6 @@ return array('leading' => 'leading space', 'trailing' => 'trailing tabs', 'mixed
<ul>
<li>both</li>
</ul>
after
after
15
18