commonmark / commonmark/commonmark.js
Definition + setext underline/thematic break, creates loose empty paragraph
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 231
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 3
Description
I think this is a bug in commonmark.js:
[a]: b
---
[a]: b
===
On the dingus, it yields:
<p></p>
<hr />
<p>===</p>
Rendered here (cmark-gfm + more GH stuff, likely same as just cmark):
<p>---</p>
<p>===</p>
---
===
- I don’t think a random empty
<p></p>should show up, that’s a clear bug. - I probably think, but this is more vague, that
<p>---</p>makes more sense here, as definitions/paragraphs/setext heading underlines interplay weirdly (https://github.com/commonmark/commonmark-spec/issues/605).
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
Start by reproducing the two-block input in the commonmark.js dingus and compare its output with cmark and cmark-gfm. Read the linked CommonMark specification discussion to understand the definitions, setext underline, and thematic break interaction. Done means the chosen behavior is implemented and covered by a regression test, including the empty-paragraph case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100