-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add line numbers on all block tokens during parsing (#144) #188
Conversation
b3eed83
to
639e1fd
Compare
@anderskaplan, thank you, I will try to look at this for the next release. |
Finally, I have found time for mistletoe once again. :) @anderskaplan, I must say "good job" 👍 . Basically, I like it, including the clever way of the new unit test. Probably just 3 more things be resolved:
Not sure here, but probably yes, it could? :) |
Hey @pbodnar, just checking in to say hi. The last weeks have been quite busy with other things but I'll get back to this as soon as I can. |
eb5fac2
to
ddccba1
Compare
I have updated the documentation, made the line_number parameter optional, and run the benchmark as requested in the review. The benchmark results have a fairly large variance (5 %CV) from run to run on my machine. But I'm fairly confident that the performance penalty of the line numbers is negligible, because if I compare the mean benchmark with and without line numbers from five runs of each type, then the relative difference is about 0.1%. I.e., far less than the run-to-run variance. I also added the |
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.
@anderskaplan, thank you for the amendments, I've found just one typo. :)
Beside that, it looks like some other conflicting commits were made in the mean time...
ddccba1
to
25d147b
Compare
…e developer's guide
25d147b
to
6070d7e
Compare
This is a partial solution for #144 which records line numbers on all block tokens. The span tokens are still left unlabeled, but at least it's a starting point, and I think the functionality added here is useful by itself.
Open question: should the
line_number
be a added torepr_attributes
, so that it gets included in the output fromASTRenderer
?