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

Strong and em combination at different position of word inconsistency. #561

Closed
AlexanderSergan opened this issue Jun 6, 2019 · 4 comments

Comments

@AlexanderSergan
Copy link

AlexanderSergan commented Jun 6, 2019

Greetings!

I'd like to ask a question about correct and bugless em and strong composition. Le'ts assume we want to define strong and em marks at different parts of word:
***example*** -> example
ex***amp***le -> example
***exam***ple -> example
ex***ample*** -> example

I created small demo with different combinations of em marks (* and _) in markdownIt demo:
markdownIt demo
and commonmark demo

Looking at fact, that compilation results has such diversity, I'm curious if there is a right way to define such styling constructions in markdownIt?
Thanks for any clarification.


P.S.:

markdownIt demo page:

markdownIt demo

commonmark demo page:

image

@puzrin
Copy link
Member

puzrin commented Jun 6, 2019

@AlexanderSergan

By default reference (dingus) implementation has priority.

  1. https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis - that's a right start point to read.
  2. Since this repo is about implementation only, https://talk.commonmark.org/ is better place for questions about markup.

Of cause, divergence from reference implementation is not nice and should be fixed. I'd suggest you post your samples to spec repo, because it worth add those into official test cases.

@AlexanderSergan
Copy link
Author

@puzrin thanks for such quick reply. Please check out PR #562 if they are correct. Im new to this repo and I'm not sure if they are in correct place. Thanks.

@rlidwka rlidwka closed this as completed in e519e6a Jul 8, 2019
@rlidwka
Copy link
Member

rlidwka commented Jul 8, 2019

It was changed in commonmark 0.29 (see commonmark/commonmark-spec@83ed53e). Should work now after updating code up to spec.

@AlexanderSergan
Copy link
Author

Thank you, @rlidwka for the commit. I confirm that this issue resolved with 9.0.0 release.

aforismesen added a commit to aforismesen/markdown-it that referenced this issue Jul 12, 2024
This is now allowed as per commonmark 0.29 spec:
ex***amp***le

See also:
commonmark/commonmark-spec@83ed53e

fix markdown-it/markdown-it#561
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

3 participants