Skip to content

Commit 256f63b

Browse files
committed
tests
1 parent 0026475 commit 256f63b

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

tests/functional/Extension/Attributes/data/special_attributes.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ <h2 class="main shine" id="the-site">The Site</h2>
1313
<p>Attributes without quote and non-whitespace char and a dot <a target="_blank" href="http://url.com" rel="noopener noreferrer">link</a>.</p>
1414
<p>Multiple attributes without quote and non-whitespace char and a dot <a class="class" id="id" target="_blank" href="http://url.com" rel="noopener noreferrer">link</a>.</p>
1515
<p><img valueless-attribute src="/assets/image.jpg" alt="image" /></p>
16+
<p>A paragraph containing {{ mustache }} templating</p>
17+
<p>A paragraph ending with {{ mustache }} templating</p>
18+
<p>{{ mustache }} A paragraph starting with mustache templating</p>

tests/functional/Extension/Attributes/data/special_attributes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ Attributes without quote and non-whitespace char and a dot [link](http://url.com
3030
Multiple attributes without quote and non-whitespace char and a dot [link](http://url.com){#id .class target=_blank}.
3131

3232
![image](/assets/image.jpg){valueless-attribute}
33+
34+
A paragraph containing {{ mustache }} templating
35+
36+
A paragraph ending with {{ mustache }} templating
37+
38+
{{ mustache }} A paragraph starting with mustache templating
39+

tests/unit/Extension/Attributes/Util/AttributesHelperTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public static function dataForTestParseAttributes(): iterable
101101
// Curly braces inside of values
102102
yield [new Cursor('{: data-json="{1,2,3}" }'), ['data-json' => '{1,2,3}']];
103103
yield [new Cursor('{data-json={1,2,3}} test'), ['data-json' => '{1,2,3}'], ' test'];
104+
105+
// Avoid mustache style templating language being parsed as attributes
106+
yield [new Cursor('{{ foo }}'), [], '{{ foo }}'];
107+
yield [new Cursor(' {{ foo }}'), [], ' {{ foo }}'];
104108
}
105109

106110
/**

0 commit comments

Comments
 (0)