Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Quotes at the end of a URL are treated as the title #239

Closed
jdavis opened this issue Apr 4, 2015 · 3 comments
Closed

Bug: Quotes at the end of a URL are treated as the title #239

jdavis opened this issue Apr 4, 2015 · 3 comments
Assignees
Labels

Comments

@jdavis
Copy link

@jdavis jdavis commented Apr 4, 2015

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:

http://vimdoc.sourceforge.net/htmldoc/options.html#'edcompatible'

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.

@gettalong gettalong self-assigned this Apr 5, 2015
@gettalong gettalong added the bug label Apr 5, 2015
@gettalong
Copy link
Owner

@gettalong gettalong commented Apr 5, 2015

Thanks for reporting this bug! Will be fixed for the next release!

@gettalong
Copy link
Owner

@gettalong gettalong commented Apr 26, 2015

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).

@gettalong gettalong closed this Apr 26, 2015
gettalong added a commit that referenced this issue Apr 26, 2015
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
@jdavis
Copy link
Author

@jdavis jdavis commented Apr 26, 2015

Excellent. Great work, @gettalong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants