-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: regression with unquoted attribute with trailing slash (#1561)
(cherry picked from commit 5c26b9b)
- Loading branch information
1 parent
dd9f7ac
commit 128b68a
Showing
19 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/marko/test/render/fixtures/attr-unquoted/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/marko/test/render/fixtures/attr-unquoted/template.marko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div | ||
a="abc" | ||
b="abc " | ||
c="abc'" | ||
d='abc"' | ||
e="abc'\"" | ||
f="abc\"'" | ||
g="abc\t" | ||
h="abc\n" | ||
i="abc\r" | ||
j="abc\f" | ||
l="/abc" | ||
k="abc/" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports.templateData = {}; |
2 changes: 2 additions & 0 deletions
2
packages/marko/test/render/fixtures/attr-unquoted/vdom-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/component-aria-key/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!M#s0><div id="s0-buttonDescription">Submit the form thing</div><button aria-described-by="s0-buttonDescription">Submit</button><!M/> | ||
<!--M#s0--><div id=s0-buttonDescription>Submit the form thing</div><button aria-described-by=s0-buttonDescription>Submit</button><!--M/--> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/component-file-export-class/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div><!M#s0-1><div class=hello>Hello Frank!</div><!M/></div> | ||
<div><!--M#s0-1--><div class=hello>Hello Frank!</div><!--M/--></div> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/component-label-for/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!M#s0><label for="s0-submitButton">Submit</label><button id="s0-submitButton">Submit</button><!M/> | ||
<!--M#s0--><label for=s0-submitButton>Submit</label><button id=s0-submitButton>Submit</button><!--M/--> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/component-safe-json/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!M#s0><!DOCTYPE html><html lang=en><body>Hello<script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0",0,{"foo-0":"bar\u2028","foo-1":"bar\u2029","foo-2":"\u2028bar\u2029","foo-3":"Hello \u003C/script> \u2028bar\u2029"},{"f":1}]],"t":["5hvxGDmQ"]})</script></body></html><!M/> | ||
<!--M#s0--><!DOCTYPE html><html lang=en><body>Hello<script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0",0,{"foo-0":"bar\u2028","foo-1":"bar\u2029","foo-2":"\u2028bar\u2029","foo-3":"Hello \u003C/script> \u2028bar\u2029"},{"f":1}]],"t":["5hvxGDmQ"]})</script></body></html><!--M/--> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/components-await-beginAsync/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html><body><!--FLUSH--><div class=inner><div class=inner-inner><!M#s0-7><div>Hello inner-inner</div><!M/></div><!M#s0-8><div>Hello inner</div><!M/></div><!M#s0-9><div>Hello outer</div><!M/><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-8",0,{"name":"inner"},{"f":1}],["s0-7",0,{"name":"inner-inner"},{"f":1}],["s0-9",0,{"name":"outer"},{"f":1}]],"t":["3fH9fWWr"]})</script></body></html> | ||
<html><body><!--FLUSH--><div class=inner><div class=inner-inner><!--M#s0-7--><div>Hello inner-inner</div><!--M/--></div><!--M#s0-8--><div>Hello inner</div><!--M/--></div><!--M#s0-9--><div>Hello outer</div><!--M/--><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-8",0,{"name":"inner"},{"f":1}],["s0-7",0,{"name":"inner-inner"},{"f":1}],["s0-9",0,{"name":"outer"},{"f":1}]],"t":["3fH9fWWr"]})</script></body></html> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/components-await-title/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html><head><title><!--FLUSH-->Welcome Frank</title></head><body><!M#s0-0-5-5><div>Hello</div><!M/><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-0-5-5",0,{},{"f":1}]],"t":["2tNfdcYI"]})</script></body></html> | ||
<html><head><title><!--FLUSH-->Welcome Frank</title></head><body><!--M#s0-0-5-5--><div>Hello</div><!--M/--><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-0-5-5",0,{},{"f":1}]],"t":["2tNfdcYI"]})</script></body></html> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/components-await/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html><body><!--FLUSH--><div class=inner><!--FLUSH--><div class=inner-inner><!M#s0-8><div>Hello inner-inner</div><!M/></div><!M#s0-9><div>Hello inner</div><!M/></div><!M#s0-10><div>Hello outer</div><!M/><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-8",0,{"name":"inner-inner"},{"f":1}],["s0-9",0,{"name":"inner"},{"f":1}],["s0-10",0,{"name":"outer"},{"f":1}]],"t":["2u6T2uUb"]})</script></body></html> | ||
<html><body><!--FLUSH--><div class=inner><!--FLUSH--><div class=inner-inner><!--M#s0-8--><div>Hello inner-inner</div><!--M/--></div><!--M#s0-9--><div>Hello inner</div><!--M/--></div><!--M#s0-10--><div>Hello outer</div><!--M/--><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-8",0,{"name":"inner-inner"},{"f":1}],["s0-9",0,{"name":"inner"},{"f":1}],["s0-10",0,{"name":"outer"},{"f":1}]],"t":["2u6T2uUb"]})</script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<html><head>Components</head><body><!M#s0-3><div><h1>foo1</h1><div><h1>bar1</h1></div><div><h1>bar2</h1></div><div><h1>foo-split1</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div><div><h1>foo-split2</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div></div><!M/><!M#s0-4><div><h1>foo2</h1><div><h1>bar1</h1></div><div><h1>bar2</h1></div><div><h1>foo-split1</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div><div><h1>foo-split2</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div></div><!M/><!M#s0-5><div><h1>split1</h1><!M^s0-5-@split-child1 s0-5 @split-child1><div><h1>split-child1</h1></div><!M/><!M^s0-5-@split-child2 s0-5 @split-child2><div><h1>split-child2</h1></div><!M/></div><!M/><!M#s0-6><div><h1>split2</h1><!M^s0-6-@split-child1 s0-6 @split-child1><div><h1>split-child1</h1></div><!M/><!M^s0-6-@split-child2 s0-6 @split-child2><div><h1>split-child2</h1></div><!M/></div><!M/><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-3",0,{"name":"foo1"},{"f":1}],["s0-4",0,{"name":"foo2"},{"f":1}],["s0-5",1,{"name":"split1"}],["s0-5-@split-child1",2,{"name":"split-child1"}],["s0-5-@split-child2",2,{"name":"split-child2"}],["s0-6",1,{"name":"split2"}],["s0-6-@split-child1",2,{"name":"split-child1"}],["s0-6-@split-child2",2,{"name":"split-child2"}]],"t":["EMljIY5B","30jLCJ__","IdzCtSbr"]})</script></body></html> | ||
<html><head>Components</head><body><!--M#s0-3--><div><h1>foo1</h1><div><h1>bar1</h1></div><div><h1>bar2</h1></div><div><h1>foo-split1</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div><div><h1>foo-split2</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div></div><!--M/--><!--M#s0-4--><div><h1>foo2</h1><div><h1>bar1</h1></div><div><h1>bar2</h1></div><div><h1>foo-split1</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div><div><h1>foo-split2</h1><div><h1>split-child1</h1></div><div><h1>split-child2</h1></div></div></div><!--M/--><!--M#s0-5--><div><h1>split1</h1><!--M^s0-5-@split-child1 s0-5 @split-child1--><div><h1>split-child1</h1></div><!--M/--><!--M^s0-5-@split-child2 s0-5 @split-child2--><div><h1>split-child2</h1></div><!--M/--></div><!--M/--><!--M#s0-6--><div><h1>split2</h1><!--M^s0-6-@split-child1 s0-6 @split-child1--><div><h1>split-child1</h1></div><!--M/--><!--M^s0-6-@split-child2 s0-6 @split-child2--><div><h1>split-child2</h1></div><!--M/--></div><!--M/--><script>$MC=(window.$MC||[]).concat({"l":1,"w":[["s0-3",0,{"name":"foo1"},{"f":1}],["s0-4",0,{"name":"foo2"},{"f":1}],["s0-5",1,{"name":"split1"}],["s0-5-@split-child1",2,{"name":"split-child1"}],["s0-5-@split-child2",2,{"name":"split-child2"}],["s0-6",1,{"name":"split2"}],["s0-6-@split-child1",2,{"name":"split-child1"}],["s0-6-@split-child2",2,{"name":"split-child2"}]],"t":["EMljIY5B","30jLCJ__","IdzCtSbr"]})</script></body></html> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/dynamic-split-component/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!M#s0-0><div data-marko-key="@test s0-0">Body data</div><!M/><!M#s0-1><div>Body data</div><!M/><!M#s0-2><div data-marko-key="@test s0-2"></div><!M/><!M#s0-3><div></div><!M/> | ||
<!--M#s0-0--><div data-marko-key="@test s0-0">Body data</div><!--M/--><!--M#s0-1--><div>Body data</div><!--M/--><!--M#s0-2--><div data-marko-key="@test s0-2"></div><!--M/--><!--M#s0-3--><div></div><!--M/--> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/dynamic-tag-arguments/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!M#s0><!F#0>testPage http://ebay.com<div style="color:green"></div><!F/><!M/> | ||
<!--M#s0--><!--F#0-->testPage http://ebay.com<div style=color:green></div><!--F/--><!--M/--> |
2 changes: 1 addition & 1 deletion
2
packages/marko/test/render/fixtures/global-runtime-id/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!FOO#s0><div></div><!FOO/> | ||
<!--FOO#s0--><div></div><!--FOO/--> |