Skip to content

Commit 7a345a8

Browse files
snyamathiDylanPiercey
authored andcommitted
test: add regression test for quotes
1 parent d8de146 commit 7a345a8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/__tests__/fixtures/placeholder-within-script-within-string/__snapshots__/placeholder-within-script-within-string.expected.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,15 @@
88
│ ││ │╰─ text "alert(\"Hello "
99
│ ││ ╰─ openTagEnd
1010
│ │╰─ tagName "script"
11+
╰─ ╰─ openTagStart
12+
2╭─ <script>alert('${xyz}')</script>
13+
│ ││ ││ │ │ │ │ │ ╰─ closeTagEnd(script)
14+
│ ││ ││ │ │ │ │ ╰─ closeTagName "script"
15+
│ ││ ││ │ │ │ ╰─ closeTagStart "</"
16+
│ ││ ││ │ │ ╰─ text "')"
17+
│ ││ ││ │ ╰─ placeholder:escape.value "xyz"
18+
│ ││ ││ ╰─ placeholder:escape "${xyz}"
19+
│ ││ │╰─ text "alert('"
20+
│ ││ ╰─ openTagEnd
21+
│ │╰─ tagName "script"
1122
╰─ ╰─ openTagStart
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
<script>alert("Hello ${xyz}!")</script>
1+
<script>alert("Hello ${xyz}!")</script>
2+
<script>alert('${xyz}')</script>

0 commit comments

Comments
 (0)