SimonWaldherr / micromarkdown.js

convert markdown to html in under 5kb
http://simonwaldherr.github.io/micromarkdown.js/
MIT License
208 stars 44 forks source link

Links break if they contain underscores or asterisks #13

Closed pachanka closed 8 years ago

pachanka commented 8 years ago

Hello, I appreciate your library, very nice work. However I've encountered a bug and thought I'd let you know. This example:

[markdown](http://en.wikipedia.org/wiki/_Markdown_)

... Will stop the link from rendering. The same is true with images:

#![µmd.js](http://simonwaldherr.de/test_umd_.png)

I guess its worth noting that two asterisks also break it, even if they are not a common thing in URLs

[markdown](http://en.wikipedia.org/wiki/*Markdown*)

Cheers.

pachanka commented 8 years ago

Nevermind, I just read about escaping markdown. It works fine if you escape the offending characters:

[markdown](http://en.wikipedia.org/wiki/\_Markdown\_)

Thanks again.