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 correct both flag when pushing remaining delimiters to stack #682

Conversation

notriddle
Copy link
Collaborator

Fixes #657

Here's the delimiter match-ups that pulldown-cmark made before this commit, annotated to make clear the both flag and the multiple-of-three matching that was erroneously applied:

****foo*bar*baz****
^^12   2   1   ^^^^ = 6
       -   - both

***R]*-*
^^1  1 ^ = 3
     - both

Fixes pulldown-cmark#657

Here's the delimiter match-ups that pulldown-cmark made before this
commit, annotated to make clear the both flag and the
multiple-of-three matching that was erroneously applied:

    ****foo*bar*baz****
    ^^12   2   1   ^^^^ = 6
           -   - both

    ***R]*-*
    ^^1  1 ^ = 3
         - both
@Martin1887
Copy link
Collaborator

Thanks for your contribution.

I need more time to fully understand the emphasis algorithm, but it looks well.

Could you take a look, @raphlinus?

Copy link
Collaborator

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

I believe this change is correct. Good catch!

@Martin1887
Copy link
Collaborator

Perfect, thanks!

@Martin1887 Martin1887 merged commit adcc51d into pulldown-cmark:master Jun 29, 2023
1 check passed
@notriddle notriddle deleted the notriddle/emphasis-matching-on-both branch June 29, 2023 17:29
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.

Strong with nested emphasis parses as "**"
3 participants