-
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: improve detection of regexp vs division
- Loading branch information
1 parent
4b2b199
commit 3a696d0
Showing
4 changed files
with
37 additions
and
9 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 | ||
--- | ||
|
||
When the preceding character of an expression is a quote, prefer division over regexp state. This improves parsing for inline css grid properties. |
12 changes: 12 additions & 0 deletions
12
src/__tests__/fixtures/css-grid/__snapshots__/css-grid.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,12 @@ | ||
1╭─ style.scss { | ||
│ │ ││ ╰─ attrName "{\n .foo {\n grid: \"left right\" / 3fr 7fr;\n }\n}" | ||
│ │ │╰─ tagShorthandClass.quasis[0] "scss" | ||
│ │ ╰─ tagShorthandClass ".scss" | ||
╰─ ╰─ tagName "style" | ||
2├─ .foo { | ||
3├─ grid: "left right" / 3fr 7fr; | ||
4├─ } | ||
5├─ } | ||
6╭─ | ||
│ ├─ openTagEnd | ||
╰─ ╰─ closeTagEnd(style) |
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 @@ | ||
style.scss { | ||
.foo { | ||
grid: "left right" / 3fr 7fr; | ||
} | ||
} |
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