gettalong / kramdown

kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.
http://kramdown.gettalong.org
Other
1.72k stars 275 forks source link

Abbreviations are destroyed by line breaks #717

Open cabo opened 3 years ago

cabo commented 3 years ago

Input:

*[foo bar]: baz

hello foo bar babble.

hello foo
bar babble.

Output:

<p>hello <abbr title="baz">foo bar</abbr> babble.</p>

<p>hello foo
bar babble.</p>

This is bad if the markdown author uses a line-breaking editor.

cabo commented 3 years ago

The abbreviation scanner also doesn't like non-breaking spaces inside the abbreviation.

It should accept any kind of whitespace.