-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lexer: simplify attribute lexing algorithm
Attribute names in HTML can include almost anything. Essentially, only the () brackets will need to be quoted since they're also used in pugneum syntax. Pugneum will be fully static so there will be no need to escape values. Remove the ! syntax which can now be used in attribute names. Notably, commas are valid attribute names! Remove the comma from the pugneum attribute syntax. It serves no purpose and forces the user to quote them. The result is that this: a(b, c) Actually refers to two boolean attributes "a," and "b". However, in this case the trailing comma will result in an error: a(b='c', d) This is because the quote unambiguously ends the value and values must be separated by spaces. Fix the attribute value quotes handling. The quotes aren't included in the values anymore. Attribute text can include almost anything as well but validating these contents is more complex than attribute names. Maybe I'll do it later. Also update test snapshots to reflect these changes.
- Loading branch information
1 parent
2d2acae
commit 9cfe08b
Showing
9 changed files
with
1,203 additions
and
1,608 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
Oops, something went wrong.