Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix stripHTML to properly format Markdown links #113

Merged
merged 1 commit into from

2 participants

@elisee

stripHTML returned

(label)[url]

but Markdown links should be of the form

[label](url)

The attached commit fixes this.

@elisee elisee Fix stripHTML to properly format Markdown links
stripHTML returned (label)[url], but Markdown links are of the form
[label](url).
17b293e
@andris9 andris9 merged commit 3e7cedc into andris9:master

1 check passed

Details default The Travis build passed
@andris9
Owner

Thanks a lot, somehow missed it myself

@elisee

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. @elisee

    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
View
3  lib/helpers.js
@@ -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.