-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: avoid regexp parsing for expression continuations
- Loading branch information
1 parent
250c17b
commit 08bdb4e
Showing
9 changed files
with
361 additions
and
104 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 | ||
--- | ||
|
||
Switch from regexp based parsing for the expression continuations. This slightly improves performance and more importantly fixes usage of the parser in safari. |
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
9 changes: 9 additions & 0 deletions
9
...ures/attr-operator-whitespace-eof/__snapshots__/attr-operator-whitespace-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,9 @@ | ||
1╭─ tag a = 'foo' instanceof | ||
│ │ │ │ │ ╰─ attrName "instanceof" | ||
│ │ │ │ ╰─ attrValue.value "'foo'" | ||
│ │ │ ╰─ attrValue "= 'foo'" | ||
│ │ ╰─ attrName | ||
╰─ ╰─ tagName "tag" | ||
2╭─ | ||
│ ├─ openTagEnd | ||
╰─ ╰─ closeTagEnd(tag) |
1 change: 1 addition & 0 deletions
1
src/__tests__/fixtures/attr-operator-whitespace-eof/input.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 @@ | ||
tag a = 'foo' instanceof |
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
Oops, something went wrong.