Skip to content

Use correct both flag when pushing remaining delimiters to stack#682

Merged
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/emphasis-matching-on-both
Jun 29, 2023
Merged

Use correct both flag when pushing remaining delimiters to stack#682
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/emphasis-matching-on-both

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
@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