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

Links in parens break #38

Closed
beatgammit opened this issue Feb 2, 2012 · 2 comments
Closed

Links in parens break #38

beatgammit opened this issue Feb 2, 2012 · 2 comments

Comments

@beatgammit
Copy link

I have something like this:

Lorem ipsum (lorem ipsum) dolar sit amut.

However, the last closing paren is removed. I am getting something like this instead:

Lorem ipsum (lorem ipsum dolar sit amut.

Github does this correctly, as does dingus.

I tracked it down to markdown.js:823,

/^\[([\s\S]*?)\][ \t]*\([ \t]*(\S+)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/

This regex is greedily matching up to the last ).

@ashb
Copy link
Collaborator

ashb commented Apr 9, 2012

Fixed last night in the other link bug. Output is now

Lorem ipsum (<a href="http://www.lipsum.com/)">lorem ipsum</a> dolar sit amut.</p>

which looks right now.

@ashb ashb closed this as completed Apr 9, 2012
@ashb ashb reopened this Apr 9, 2012
@ashb
Copy link
Collaborator

ashb commented Apr 9, 2012

Gah that's clearly not. The end of the regex is in the wrong place.

@ashb ashb closed this as completed in 25beaba Apr 9, 2012
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

2 participants