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

Different emphasis delimiters #20

Closed
shodgson opened this issue Jan 15, 2019 · 1 comment
Closed

Different emphasis delimiters #20

shodgson opened this issue Jan 15, 2019 · 1 comment

Comments

@shodgson
Copy link

Currently, emphasis is started and ended with either '*' or '_', but the same character should be needed.

Input:
*foo_bar*

Expected result:
<em>foo_bar</em>

Actual result:
<em>foo</em>bar*

From v0.28 of the CommonMark Spec:

  1. Emphasis begins with a delimiter that can open emphasis and ends with a delimiter that can close emphasis, and that uses the same character (_ or *) as the opening delimiter.
@ttscoff
Copy link
Owner

ttscoff commented Sep 13, 2019

That's fine and well for CommonMark, but with a rudimentary regex processor, I can't do this. If you were to use _**bold italic**_ my regular expression wouldn't pick it up properly if it was pairing the exact open and close. Lazy emphasis parsing isn't part of canonical Markdown, either.

@ttscoff ttscoff closed this as completed Sep 13, 2019
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

No branches or pull requests

2 participants