commonmark / commonmark/cmark

Link Reference Definition Followed by Hyphen Underline

Open
#575 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2k
Forks
691
Avg merge
1d 16h
Merged PRs (30d)
1

Description

Input:

[foo]: bar
---

cmark gives me this:

$ cmark
[foo]: bar
---

<p>---</p>

This is different to the output in dingus:

<p></p>
<hr />

I'd say that this is also incorrect because of the empty paragraph, but obviously at least one of cmark/commonmark.js is doing the wrong thing here.

I'm not certain what this should render to per the spec, but I think it should be interpreted as a link reference definition followed by a thematic break, and should render as just <hr />.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two-line input with the cmark command and compare its output with the CommonMark dingus result linked in the issue. Trace how cmark handles the link reference definition followed by the hyphen underline, then verify that the corrected rendering is a thematic break without an empty paragraph.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, markdown
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.