Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix stripHTML to properly format Markdown links #113

Merged
merged 1 commit into from

2 participants

Elisée Andris Reinman
Elisée

stripHTML returned

(label)[url]

but Markdown links should be of the form

[label](url)

The attached commit fixes this.

Elisée elisee Fix stripHTML to properly format Markdown links
stripHTML returned (label)[url], but Markdown links are of the form
[label](url).
17b293e
Andris Reinman andris9 merged commit 3e7cedc into from
Andris Reinman
Owner

Thanks a lot, somehow missed it myself

Elisée

Sure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 26, 2012
  1. Elisée

    Fix stripHTML to properly format Markdown links

    elisee authored
    stripHTML returned (label)[url], but Markdown links are of the form
    [label](url).
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/helpers.js
3  lib/helpers.js
View
@@ -1,4 +1,3 @@
-
// expose to the world
module.exports.stripHTML = stripHTML;
@@ -102,7 +101,7 @@ function stripHTML(str){
var paramMatch = params.match(/href\s*=\s*['"]([^'"]+)['"]/),
url = paramMatch && paramMatch[1] || "#";
- return "(" + content.trim() + ")" + "[" + url +"]";
+ return "[" + content.trim() + "]" + "(" + url +")";
});
// UL, replace with newlines
Something went wrong with that request. Please try again.