commonmark / commonmark/commonmark.js
Incorrect emphasis handling
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 231
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 3
Description
(Distilled from https://talk.commonmark.org/t/i-dont-understand-how-emphasis-is-parsed/3866)
Input:
*****Hello*world****
Actual Output:
<p>*****Hello<em>world</em>***</p>
Expected Output:
<p>**<em><strong>Hello<em>world</em></strong></em></p>
More detailed rationale can be found in this comment: https://talk.commonmark.org/t/i-dont-understand-how-emphasis-is-parsed/3866/8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Markdown input *****Hello*world**** and trace the emphasis parsing entry point to compare the actual and expected HTML. Add a regression test for this example and confirm the parser produces the expected nested emphasis and strong elements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100