- Notifications
You must be signed in to change notification settings - Fork294
Tokenizer: use Python objects to represent tokens#521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
Show all changes
19 commits Select commitHold shift + click to select a range
183d8a0
Consistency: consume a single character at a time during attribute na…
jayaddison2e86373
Refactor: pretranslate lowercase element and attribute names
jayaddison8f96b17
Restore self.currentToken safety check
jayaddisona912842
Alternate approach: do not pretranslate temporary buffered data
jayaddisonf9f370e
Consistency: character consumption within double-escaped state
jayaddisonbcee8bd
Refactor: use Python objects for tokens within tokenizer
jayaddison67262f8
Introduce type hierarchy for tag-related tokens
jayaddison900bdaf
Simplify tag token construction
jayaddison1f6cae9
Refactor token attribution name/value accumulation
jayaddison695ac1c
Cleanup: remove leavingThisState / emitToken logic
jayaddisonb1a444b
Remove EmptyTag tokenizer token class
jayaddisonbb7fabc
Refactor: pre-translate strings that are only used in lowercase context
jayaddison5f4ace9
Cleanup: remove getattr anti-pattern
jayaddisond744c86
Consistency: use camel-casing to correspond with existing codebase style
jayaddison1d62e69
Consistency: consume a single character at a time during attribute na…
jayaddison8772408
Merge branch 'tokenizer/pretranslate-lowercase-names' into tokenizer/…
jayaddison192cce0
Linting cleanup
jayaddisone76e0dd
Clarify method name: clearAttribute -> flushAttribute
jayaddisonda37332
Merge branch 'master' into tokenizer/object-tokens
jayaddisonFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
881 changes: 372 additions & 509 deletionshtml5lib/_tokenizer.py
Large diffs are not rendered by default.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
14 changes: 0 additions & 14 deletionshtml5lib/constants.py
This file contains hidden or 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
404 changes: 197 additions & 207 deletionshtml5lib/html5parser.py
Large diffs are not rendered by default.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
17 changes: 8 additions & 9 deletionshtml5lib/tests/test_tokenizer2.py
This file contains hidden or 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
31 changes: 14 additions & 17 deletionshtml5lib/tests/tokenizer.py
This file contains hidden or 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
28 changes: 14 additions & 14 deletionshtml5lib/treebuilders/base.py
This file contains hidden or 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
6 changes: 3 additions & 3 deletionshtml5lib/treebuilders/dom.py
This file contains hidden or 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
14 changes: 7 additions & 7 deletionshtml5lib/treebuilders/etree_lxml.py
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.