-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Remove nptable tokenizer #2126
Remove nptable tokenizer #2126
Conversation
nptable is 95% identical to table, except for handling a weird special case. Special case now handled in splitCells()
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/4oXnciCGLtV8qWTA9UbueQMZPyoe |
Is this in the spec or just unspecified behavior that gfm seems to get wrong? |
It's not in the GFM spec one way or the other, but after playing around a lot with the Github parser, that appears to be the rule. So this is more "replicating what Github's parser does". |
When I merge them I just cancel the release in CI until the last one. |
Integrated into #2124 |
nptable
tokenizer is 95% identical totable
, except for handling a weird edge case. This PR moves that special case to be handled in splitCells() to reduce code redundancy and improve speed (one less tokenizer to cycle through).Also corrects one
new
test that did not follow the correct behavior compared to actual Github behavior: If a row of cells is missing the leading\trailing pipe, then the leading\trailing cell cannot be empty.(this is also just some cleanup in prep for #2124, since moving things into the Tokenizer was resulting in large duplicated blocks in each both
table
andnptable
)Results in:
Current Master Benchmark
This PR Benchmark
Contributor
Committer
In most cases, this should be a different person than the contributor.