Bug: Quotes at the end of a URL are treated as the title #239
I came across this issue while working on the latest newsletter for Neovim.
In it, there are links to Vimdocs and some of the links that look like:
with quotes at the end to denote an element on the page.
When including these as links at the end of the Markdown doc like this:
[Link 1](http://vimdoc.sourceforge.net/htmldoc/options.html#'edcompatible') [Link 2][link-2] [link-2]: http://vimdoc.sourceforge.net/htmldoc/options.html#'edcompatible'
It ends up looking like this:
<p><a href="http://vimdoc.sourceforge.net/htmldoc/options.html#'edcompatible'">Link 1</a> <a href="http://vimdoc.sourceforge.net/htmldoc/options.html#" title="edcompatible">Link 2</a></p>
Which isn't correct. As you can see, the inline link works correctly while the second one doesn't.
The text was updated successfully, but these errors were encountered:
Okay, reading the syntax definition for reference links (http://kramdown.gettalong.org/syntax.html#reference-links) says that single/double quotes in reference links are not allowed although the code allows them in inline links.
I have clarified the syntax on the syntax definition page for inline and reference style links to allow single/double quotes in both (in inline links this was already allowed by the code).
Single and double quotes are now allowed in both forms, provided they are not preceeded by a space (they were already allowed in inline links although this was not documented). The syntax document has been adjusted accordingly. Additional, the syntax document has been adjusted for reference links to mention that the spaces/tabs between link ID in brackets and the URL are optional. Fixes #239