evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

Support Markdown links with multiple spaces in front #127

Closed eviltrout closed 10 years ago

eviltrout commented 10 years ago

Current markdown-js was failing if you attempted to format:

[URL and title](/url/ "title preceded by two spaces").

In this case, it would put the second space in the url section:

<p><a href="url " title="title">text</a></p>

This patch ensures that the URL has no trailing spaces.

eviltrout commented 10 years ago

@evilstreak Good catch. I updated the PR and added tests for tabs too. Works great!