-
-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser/html): fix whitespace being lexed as html literal
- Loading branch information
Showing
12 changed files
with
179 additions
and
181 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,19 +40,7 @@ HtmlRoot { | |
r_angle_token: R_ANGLE@12..13 ">" [] [], | ||
}, | ||
HtmlContent { | ||
value_token: HTML_LITERAL@13..18 "This" [] [Whitespace(" ")], | ||
}, | ||
HtmlContent { | ||
value_token: HTML_LITERAL@18..23 "text" [] [Whitespace(" ")], | ||
}, | ||
HtmlContent { | ||
value_token: HTML_LITERAL@23..26 "is" [] [Whitespace(" ")], | ||
}, | ||
HtmlContent { | ||
value_token: HTML_LITERAL@26..33 "inside" [] [Whitespace(" ")], | ||
}, | ||
HtmlContent { | ||
value_token: HTML_LITERAL@33..36 "br." [] [], | ||
value_token: HTML_LITERAL@13..36 "This text is inside br." [] [], | ||
}, | ||
], | ||
HtmlBogusElement { | ||
|
@@ -107,16 +95,8 @@ HtmlRoot { | |
2: [email protected] | ||
3: (empty) | ||
4: [email protected] ">" [] [] | ||
2: [email protected] | ||
0: [email protected] "This" [] [Whitespace(" ")] | ||
3: [email protected] | ||
0: [email protected] "text" [] [Whitespace(" ")] | ||
4: [email protected] | ||
0: [email protected] "is" [] [Whitespace(" ")] | ||
5: [email protected] | ||
0: [email protected] "inside" [] [Whitespace(" ")] | ||
6: [email protected] | ||
0: [email protected] "br." [] [] | ||
2: [email protected] | ||
0: [email protected] "This text is inside br." [] [] | ||
2: [email protected] | ||
0: [email protected] "<" [] [] | ||
1: [email protected] "/" [] [] | ||
|
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 |
---|---|---|
|
@@ -27,12 +27,12 @@ HtmlRoot { | |
}, | ||
children: HtmlElementList [ | ||
HtmlContent { | ||
value_token: HTML_LITERAL@5..9 "foo\n" [] [], | ||
value_token: HTML_LITERAL@5..8 "foo" [] [], | ||
}, | ||
], | ||
closing_element: missing (required), | ||
}, | ||
eof_token: EOF@9..9 "" [] [], | ||
eof_token: EOF@8..9 "" [Newline("\n")] [], | ||
} | ||
``` | ||
|
@@ -42,18 +42,18 @@ HtmlRoot { | |
0: [email protected] | ||
0: (empty) | ||
1: (empty) | ||
2: HTML_ELEMENT@0..9 | ||
2: HTML_ELEMENT@0..8 | ||
0: [email protected] | ||
0: [email protected] "<" [] [] | ||
1: [email protected] | ||
0: [email protected] "div" [] [] | ||
2: [email protected] | ||
3: [email protected] ">" [] [] | ||
1: HTML_ELEMENT_LIST@5..9 | ||
0: HTML_CONTENT@5..9 | ||
0: HTML_LITERAL@5..9 "foo\n" [] [] | ||
1: HTML_ELEMENT_LIST@5..8 | ||
0: HTML_CONTENT@5..8 | ||
0: HTML_LITERAL@5..8 "foo" [] [] | ||
2: (empty) | ||
3: EOF@9..9 "" [] [] | ||
3: EOF@8..9 "" [Newline("\n")] [] | ||
``` | ||
|
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 |
---|---|---|
|
@@ -55,11 +55,11 @@ HtmlRoot { | |
}, | ||
children: HtmlElementList [ | ||
HtmlContent { | ||
value_token: HTML_LITERAL@34..40 "\n\tfoo\n" [] [], | ||
value_token: HTML_LITERAL@34..39 "foo" [Newline("\n"), Whitespace("\t")] [], | ||
}, | ||
], | ||
closing_element: HtmlClosingElement { | ||
l_angle_token: L_ANGLE@40..41 "<" [] [], | ||
l_angle_token: L_ANGLE@39..41 "<" [Newline("\n")] [], | ||
slash_token: SLASH@41..42 "/" [] [], | ||
name: HtmlName { | ||
value_token: HTML_LITERAL@42..45 "div" [] [], | ||
|
@@ -98,11 +98,11 @@ HtmlRoot { | |
1: [email protected] | ||
0: [email protected] "\"button\"" [] [] | ||
3: [email protected] ">" [Newline("\n")] [] | ||
1: HTML_ELEMENT_LIST@34..40 | ||
0: HTML_CONTENT@34..40 | ||
0: HTML_LITERAL@34..40 "\n\tfoo\n" [] [] | ||
2: HTML_CLOSING_ELEMENT@40..46 | ||
0: L_ANGLE@40..41 "<" [] [] | ||
1: HTML_ELEMENT_LIST@34..39 | ||
0: HTML_CONTENT@34..39 | ||
0: HTML_LITERAL@34..39 "foo" [Newline("\n"), Whitespace("\t")] [] | ||
2: HTML_CLOSING_ELEMENT@39..46 | ||
0: L_ANGLE@39..41 "<" [Newline("\n")] [] | ||
1: [email protected] "/" [] [] | ||
2: [email protected] | ||
0: [email protected] "div" [] [] | ||
|
Oops, something went wrong.