Indented Link Reference Definitions not parsed correctly
See original GitHub issueI was migrating our project to use flexmark instead of pegdown, when I came across the following issue with link reference defs.
Example markdown:
This note demonstrates some of what [Markdown][1] is capable of doing.
....
*Note: the fourth item uses the Unicode character for [Roman numeral four][2].*
[1]: http://daringfireball.net/projects/markdown/
[2]: http://www.fileformat.info/info/unicode/char/2163/index.htm
Expected result:
This note demonstrates some of what Markdown is capable of doing. … Note: the fourth item uses the Unicode character for Roman numeral four.
Given result (using CommonMark profile):
This note demonstrates some of what Markdown is capable of doing.
....
Note: the fourth item uses the Unicode character for [Roman numeral four][2].
[2]: http://www.fileformat.info/info/unicode/char/2163/index.htm
CommonMark spec:
A link reference definition consists of a link label, indented up to three spaces, followed by a colon (😃, optional whitespace (including up to one line ending), a link destination, optional whitespace (including up to one line ending), and an optional link title, which if it is present must be separated from the link destination by whitespace. No further non-whitespace characters may occur on the line.
When I add an additional newline between the definitions, or when I remove the indentation (2 spaces) from the definitions, it parses/renders correctly.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@Elmervc, version 0.13.6 released. Maven central update may take some time.
@Elmervc, please don’t hesitate to open an issue on any discrepancy you encounter.