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

Track underscore lower bound by % 3 modulo #748

Merged

Conversation

notriddle
Copy link
Collaborator

@notriddle notriddle commented Oct 25, 2023

This way, a pair of underscores that don't match because of their modulo won't stop a single underscore from matching. Asterisks already do it this way.

Fixes #747

This way, a pair of underscores that don't match because of
their modulo won't stop a single underscore from matching.
Asterisks already do it this way.

_*xx*_*

_*__-_-
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one actually disagrees with commonmark.js, but agrees with commonmark-hs.

Is it related to commonmark/commonmark.js#271 ?

@Martin1887
Copy link
Collaborator

It looks well, thanks!

@Martin1887 Martin1887 merged commit d26f42f into pulldown-cmark:master Oct 26, 2023
1 check passed
@notriddle notriddle deleted the notriddle/underscore-mod-3 branch October 26, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fuzz result] double underscore surrounded by asterisks prevents crossing single-underscore emphasis
2 participants