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

Use original run lengths to judge multiples of three #730

Merged

Conversation

notriddle
Copy link
Collaborator

@notriddle notriddle commented Oct 13, 2023

Fixes #729

The phrase that the specification uses is:

If one of the delimiters can both open and close emphasis, then the sum of the lengths of the delimiter runs containing the opening and closing delimiters must not be a multiple of 3 unless both lengths are multiples of 3.

Pulldown-cmark considered a run to be split, and its size reduced, when it participated in an emphasis span, but other implementations seem to use the original length of the emphasis span to judge this rule.

The phrase that the specification uses is:

> If one of the delimiters can both open and close emphasis, then
> the sum of the lengths of the delimiter runs containing the opening
> and closing delimiters must not be a multiple of 3 unless both
> lengths are multiples of 3.

Pulldown-cmark considered a run to be split, and its size reduced,
when it participated in an emphasis span, but other implementations
seem to use the *original* length of the emphasis span to judge
this rule.
@Martin1887
Copy link
Collaborator

Cool, thanks!

@Martin1887 Martin1887 merged commit d35772d into pulldown-cmark:master Oct 19, 2023
1 check passed
@notriddle notriddle deleted the notriddle/emphasis-matching branch October 19, 2023 15:51
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] incorrect delimiter matching with long run lengths
2 participants