Skip to content

Commit fdd70bf

Browse files
committed
chore: add test for tag var after shorthand class/id
1 parent 5c286df commit fdd70bf

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/__tests__/fixtures/tag-var-declaration/__snapshots__/tag-var-declaration.expected.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,21 @@
7777
│ │ ╰─ tagVar "/ref"
7878
╰─ ╰─ tagName "div"
7979
18╭─ <div/ref />
80-
│ ││ ││ │ ╰─ closeTag(div)
8180
│ ││ ││ ╰─ openTagEnd(div) "/>"
8281
│ ││ │╰─ tagVar.value "ref"
8382
│ ││ ╰─ tagVar "/ref"
8483
│ │╰─ tagName "div"
84+
╰─ ╰─ closeTag(div)
85+
19╭─
86+
╰─ ╰─ closeTag(div)
87+
20╭─ <div#ab.cd/ref/>
88+
│ │ ││ ││ ││ ╰─ openTagEnd(div) "/>"
89+
│ │ ││ ││ │╰─ tagVar.value "ref"
90+
│ │ ││ ││ ╰─ tagVar "/ref"
91+
│ │ ││ │╰─ tagShorthandClass.quasis[0] "cd"
92+
│ │ ││ ╰─ tagShorthandClass ".cd"
93+
│ │ │╰─ tagShorthandId.quasis[0] "ab"
94+
│ │ ╰─ tagShorthandId "#ab"
95+
╰─ ╰─ tagName "div"
96+
21╭─
8597
╰─ ╰─ closeTag(div)

src/__tests__/fixtures/tag-var-declaration/input.marko

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
</>
1616

1717
<div/ref/>
18-
<div/ref />
18+
<div/ref />
19+
20+
<div#ab.cd/ref/>

0 commit comments

Comments
 (0)