Skip to content
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

Only make backticks special when codeSpans or fencedCode are enabled #239

Merged
merged 2 commits into from
Dec 31, 2022

Conversation

Witiko
Copy link
Owner

@Witiko Witiko commented Dec 30, 2022

Currently, backticks are always treated as special characters. When neither the codeSpans nor the fencedCode Lua option is enabled, any backtick character will be unsuccessfully matched against all Inline rules before it is matched by the Symbol rule, which slows down parsing. This pull request causes backticks to be treated as normal characters when codeSpans and fencedCode Lua options are disabled. This allows backticks to be matched early by the Str rule, improving the parsing speed.

@Witiko Witiko added lua Related to the Lua interface and implementation automerge This pull request will be automatically merged after continuous integration has succeeded speed Related to speed improvements labels Dec 30, 2022
@Witiko Witiko added this to the 2.20.0 milestone Dec 30, 2022
@github-actions github-actions bot merged commit cf47462 into main Dec 31, 2022
@Witiko Witiko deleted the feature/make-backticks-non-special branch December 31, 2022 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge This pull request will be automatically merged after continuous integration has succeeded lua Related to the Lua interface and implementation speed Related to speed improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant