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

Link parsing not accepting closing ')' #109

Closed
julianduque opened this issue Jan 16, 2013 · 5 comments
Closed

Link parsing not accepting closing ')' #109

julianduque opened this issue Jan 16, 2013 · 5 comments

Comments

@julianduque
Copy link

When try to render a link with an ending ')' it is failing.

var marked = require('./lib/marked');
var link = '[snapshot](http://en.wikipedia.org/wiki/Snapshot_(computer_storage\))';
console.log(marked(link));

The result has the closing ')' is outside the link.

<p><a href="http://en.wikipedia.org/wiki/Snapshot_(computer_storage">snapshot</a>)</p>
@chjj
Copy link
Member

chjj commented Jan 17, 2013

This has been a problem for a while. I forgot about it for some reason. Back on the todo list.

edit: testing GFM...

http://en.wikipedia.org/wiki/Snapshot_(computer_storage)

test

[test](http://en.wikipedia.org/wiki/Snapshot_(computer_storage\))

edit 2: GFM links handle the parenthesis, regular links do not without the backslash.

@julianduque
Copy link
Author

I was trying to fix it but i'm not that good in regex so i failed 👎

@Mithgol
Copy link
Contributor

Mithgol commented Feb 19, 2013

See my comments to the related #102.

@caitp
Copy link

caitp commented Feb 21, 2014

angular/angular.js#6377 We're encountering this with angular and dgeni, it would be nice to fix this. Seems like this hasn't been poked at for a while. I'll see if I can hack together a fix tonight, that would be nice.

The problem with this is, no matter what you do, you can still end up causing certain links to be invalid, there's no real good way to do this. But hmm.

@joshbruce
Copy link
Member

#27

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

No branches or pull requests

5 participants