Cannot handle ( ) within link URLs #237

postmodern opened this Issue May 7, 2013 · 4 comments


None yet

3 participants


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




[bash](\)) will render <a href="">bash</a>:



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

@robin850 robin850 was assigned May 26, 2013

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 robin850 added a commit that referenced this issue Jun 1, 2013
@robin850 robin850 Ensure nested parenthesis are handled into links
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 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 Jun 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment