Skip to content

Commit

Permalink
Fix stripHTML to properly format Markdown links
Browse files Browse the repository at this point in the history
stripHTML returned (label)[url], but Markdown links are of the form
[label](url).
  • Loading branch information
elisee committed Oct 26, 2012
1 parent 7ae622b commit 17b293e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// expose to the world
module.exports.stripHTML = stripHTML;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 17b293e

Please sign in to comment.