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

race in verbatim extension #199

Open
saraedum opened this issue Apr 26, 2021 · 1 comment
Open

race in verbatim extension #199

saraedum opened this issue Apr 26, 2021 · 1 comment
Labels
bug upstream The issue is caused by a dependency. It's been reported upstream and we are waiting for a release.

Comments

@saraedum
Copy link
Member

saraedum commented Apr 26, 2021

The verbatim extension registers the character \ as a special inline character with cmark-gfm so that we can detect the string \verbatim in a comment.

However, this breaks cmark-gfm as \ is added to the (global) SPECIAL_CHARS table when inlines are processed. When the processing is complete, it is removed from that table again. This seems wrong in several ways:

Btw., the way parsing works in cmark-gfm means that \verbatim cannot work whenever parse_inline() is called, e.g., at the beginning of a block since extensions are only checked after all the standard control characters have been handled.

@saraedum
Copy link
Member Author

Without changing cmark-gfm, there's not much that standardese can do about this.

It's probably best to replace the \verbatim syntax with something that can be safely parsed such as `verbatim:…`. This won't work inside backticks but inside backticks we probably do not need verbatim anyway.

@saraedum saraedum added bug upstream The issue is caused by a dependency. It's been reported upstream and we are waiting for a release. labels Apr 26, 2021
@saraedum saraedum changed the title race condition in verbatim extension race in verbatim extension Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream The issue is caused by a dependency. It's been reported upstream and we are waiting for a release.
Projects
None yet
Development

No branches or pull requests

1 participant