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

Cannot handle ( ) within link URLs #237

Closed
postmodern opened this issue May 7, 2013 · 4 comments
Closed

Cannot handle ( ) within link URLs #237

postmodern opened this issue May 7, 2013 · 4 comments
Assignees
Labels

Comments

@postmodern
Copy link

I noticed that redcarpet cannot handle nested ( ) within the URL part of links.

[bash](man:bash(1))

Produces:

<p><a>bash</a>)</p>
@aprescott
Copy link

[bash](http://example.com/bash_(1\)) will render <a href="http://example.com/bash_(1)">bash</a>:

[bash](http://example.com/bash_(1\))

@postmodern
Copy link
Author

Kramdown correctly parses nested ( ), without requiring backslash escaping.

@ghost ghost assigned robin850 May 26, 2013
@robin850
Copy link
Collaborator

After a bit of investigating, I've found that here in markdown.c, Redcarpet considers the first found parenthesis as link's end. I will try to fix this soon! Thanks for reporting.

robin850 added a commit that referenced this issue Jun 1, 2013
Make sure that parenthesis inside the link's url are correctly parsed
Redcarpet considered the first ")" occurrence as the link's end so we
first count the number of open "(" and decrement this number each
time we found a ")".

Close issue #237
@robin850
Copy link
Collaborator

robin850 commented Jun 1, 2013

I'm closing this since #258 has been merge ; I don't know why it hasn't been automagically closed when the PR has been merge...Sorry for the delay by the way.

@robin850 robin850 closed this as completed Jun 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants