-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid expr continuations for period when not followed by identifier
- Loading branch information
1 parent
33d280d
commit 61e6966
Showing
4 changed files
with
49 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"htmljs-parser": patch | ||
--- | ||
|
||
Avoid continuing expressions after a period if after the whitespace is something that could not be an identifier. |
27 changes: 27 additions & 0 deletions
27
src/__tests__/fixtures/scriptlet-eof/__snapshots__/scriptlet-eof.expected.txt
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,27 @@ | ||
1╭─ $ $global. | ||
│ │╰─ scriptlet.value "$global." | ||
╰─ ╰─ scriptlet " $global." | ||
2├─ | ||
3╭─ <header> | ||
│ ││ ╰─ openTagEnd | ||
│ │╰─ tagName "header" | ||
╰─ ╰─ openTagStart | ||
4╭─ <img.logo src=logo alt="Marko"/> | ||
│ │ ││ ││ │ ││ │ ││ ╰─ openTagEnd:selfClosed "/>" | ||
│ │ ││ ││ │ ││ │ │╰─ attrValue.value "\"Marko\"" | ||
│ │ ││ ││ │ ││ │ ╰─ attrValue "=\"Marko\"" | ||
│ │ ││ ││ │ ││ ╰─ attrName "alt" | ||
│ │ ││ ││ │ │╰─ attrValue.value "logo" | ||
│ │ ││ ││ │ ╰─ attrValue "=logo" | ||
│ │ ││ ││ ╰─ attrName "src" | ||
│ │ ││ │╰─ tagShorthandClass.quasis[0] "logo" | ||
│ │ ││ ╰─ tagShorthandClass ".logo" | ||
│ │ │╰─ tagName "img" | ||
│ │ ╰─ openTagStart | ||
╰─ ╰─ text "\n " | ||
5╭─ </header> | ||
│ │ │ ╰─ closeTagEnd(header) | ||
│ │ ╰─ closeTagName "header" | ||
│ ├─ text "\n" | ||
╰─ ╰─ closeTagStart "</" | ||
6╰─ |
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,5 @@ | ||
$ $global. | ||
|
||
<header> | ||
<img.logo src=logo alt="Marko"/> | ||
</header> |
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