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

fix brackets in link URL #390

Merged
merged 2 commits into from May 28, 2017
Merged

fix brackets in link URL #390

merged 2 commits into from May 28, 2017

Conversation

flowyear
Copy link
Contributor

Hi,
I have a markdown file like this:

This is a [link][].

[link]: https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile"

This is a real link, but the convert result is:

<p>This is a <a href="https://en.wikipedia.org/wiki/Textile_" title="markup_language) &quot;Textile">link</a>.</p>

The same problem also affects inline image syntax. I tried to fix it, since javascript regular expression doesn't support lookbehind syntax, So I modified the URL match to greedily, it should be no side effects for other code, grunt test is passed.

@flowyear
Copy link
Contributor Author

I neglected the image link,it's harder to handle, like:

[![image link](./image/cat(1).png)](http://example)

or maybe like this:

[![image link](./image/cat1).png)](http://example)

@tivie tivie self-assigned this May 28, 2017
@tivie tivie changed the base branch from master to develop May 28, 2017 16:25
@tivie tivie merged commit 7ba18dd into showdownjs:develop May 28, 2017
tivie added a commit that referenced this pull request May 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants