JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
682 stars 75 forks source link

Multiline Link Reference Definitions are parsed incorrectly. #51

Open ajalt opened 3 years ago

ajalt commented 3 years ago

The CommonMark spec allows link reference defintions to span multiple lines.

For example, the spec states that the following markdown:

[Foo bar]:
<my url>
'title'

[Foo bar]

should render like this:

<p><a href="my%20url" title="title">Foo bar</a></p>

But this library fails to recognize the link definition and instead renders it like this:

<p>[Foo bar]:
<my url>
'title'</p><p>[Foo bar]</p>