Skip to content

Correct source lines after link reference definitions - #663

Merged
jgm merged 1 commit into
commonmark:masterfrom
doomfrawen:fix/reference-definition-sourcepos
Nov 25, 2026
Merged

jgm merged 1 commit into
commonmark:masterfrom
doomfrawen:fix/reference-definition-sourcepos

Conversation

@doomfrawen

Copy link
Copy Markdown
Contributor

Closes #660.

Advance the paragraph start line by the number of lines consumed by leading link reference definitions. The text and setext headings that follow now report their actual source lines.

Regression coverage includes multiple definitions, a multiline title, CRLF input, and a heading inside a block quote. All 5 static-build and 9 shared-build CTest suites passed.

Advance the paragraph start by the number of lines consumed by leading reference definitions. This also places inline children and setext headings on their original source lines.
@jgm

jgm commented Nov 25, 2026

Copy link
Copy Markdown
Member

thanks!

@jgm
jgm merged commit 18edfe7 into commonmark:master Nov 25, 2026
15 checks passed
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

Successfully merging this pull request may close these issues.

Paragraph after a link reference definition starts on the definition's line

2 participants