-
-
Notifications
You must be signed in to change notification settings - Fork 553
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added an optional callback OnToken #1153
Conversation
Alright we definitely need to see two benchmarks here (on a large HTML document):
Could this be done? Thanks for your efforts! |
Hi, Sorry for a late reponse. Two benchmarks from parsing page.html from the benchmark project.
|
Great thanks for the efforts @schaakverslaafd - can you update your branch (sync with |
93d9e39
to
3192102
Compare
Great! (The original solution had to be changed a bit because StructHtmlToken is passed by ref. New benchmarks did not show a significant difference.) |
3192102
to
2f77596
Compare
Alright! The space changes are removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for all your efforts 🚀 !
Types of Changes
Prerequisites
Please make sure you can check the following two boxes:
Contribution Type
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Description
Added an OnToken event to the htmlParser raised when a new html token is consumed. This event passes the html token and a range in the source text corresponding to the token.
I didn't update documentation (yet). Provided this pull request to discuss issue #754.