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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two different emphasis are recognized as a single one in a paragraph node #1676

Closed
StanleySathler opened this issue May 15, 2020 · 4 comments
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@StanleySathler
Copy link

StanleySathler commented May 15, 2020

Thank you for the amazing work, guys! 馃専

Describe the bug
Let's suppose the following paragraph:

Before explaining about Promises, we should understand what is *async programming*. But, before, let's explain *synchronous programming* in a general context.

Before explaining about Promises, we should understand what is is consumed correctly.

The Lexer then calls the method Tokenizer.em() which then evaluates the set of em rules against the text.

But the last rule (/^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/) matches async programming* . But, before, let's explain *synchronous programming

Expected behavior
I expected to have matched only async programming.

To Reproduce
Just try to parse:

Before explaining about Promises, we should understand what is *async programming*. But, before, let's explain *synchronous programming* in a general context.

Demo

  1. Marked Demo
  2. CommonMark Demo

Version: 1.0.0

@UziTech UziTech added category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue labels May 15, 2020
@rikedyp
Copy link

rikedyp commented May 18, 2020

Just commenting to say I've bumped into this issue as well. Seems to do with * followed by punctuation as well?

Marked Demo

@calculuschild
Copy link
Contributor

I have a PR #1686 that should fix this kind of issue but it's still waiting on feedback from the maintainers.

@calculuschild
Copy link
Contributor

Can confirm this is fixed now.

@UziTech
Copy link
Member

UziTech commented Jul 14, 2020

Should be fixed with marked v1.1.1 馃帀

@UziTech UziTech closed this as completed Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

No branches or pull requests

4 participants