redcarpet icon indicating copy to clipboard operation
redcarpet copied to clipboard

Empty string title breaks reference style link

Open justmytwospence opened this issue 9 years ago • 1 comments

# works right:
[Google]: https://google.com/ "This is a link to Google"

# broken:
[Google]: https://google.com/ ""

The reason this is an issue is that some programs (Emacs' markdown-mode in this case) auto generate reference links with empty strings like this if they aren't explicitly given a title. I debated making an issue for markdown-mode or making an issue here, but it seems like this is an edge case that should not break the rendering of the markdown, regardless.

justmytwospence avatar Jan 30 '16 23:01 justmytwospence

To me, reference style links do not work at all (although I use redcarpet through middleman, a static site generator).

If I have the following

The component I described in [the intro post] [intropost]

And then the reference definition at the bottom of the post:

[intropost]: /2015/09/10/complex-component-design-in-ember-intro.html

The output is simply the input text, as if it had been parsed.

balinterdi avatar Feb 13 '16 22:02 balinterdi