diff --git a/dist/showdown.js b/dist/showdown.js index a4d7038..7f8124a 100644 Binary files a/dist/showdown.js and b/dist/showdown.js differ diff --git a/dist/showdown.js.map b/dist/showdown.js.map index 1950d65..8b613d1 100644 Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ diff --git a/dist/showdown.min.js b/dist/showdown.min.js index e427f36..ca2ddf2 100644 Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index b2bb56b..beb51c1 100644 Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ diff --git a/src/subParsers/paragraphs.js b/src/subParsers/paragraphs.js index 6054a5f..54e7240 100644 --- a/src/subParsers/paragraphs.js +++ b/src/subParsers/paragraphs.js @@ -18,7 +18,10 @@ showdown.subParser('paragraphs', function (text, options, globals) { // if this is an HTML marker, copy it if (str.search(/ยจ(K|G)(\d+)\1/g) >= 0) { grafsOut.push(str); - } else { + + // test for presence of characters to prevent empty lines being parsed + // as paragraphs (resulting in undesired extra empty paragraphs) + } else if (str.search(/\S/) >= 0) { str = showdown.subParser('spanGamut')(str, options, globals); str = str.replace(/^([ \t]*)/g, '

'); str += '

'; diff --git a/test/cases/strip-references.html b/test/cases/strip-references.html new file mode 100644 index 0000000..e69de29 diff --git a/test/cases/strip-references.md b/test/cases/strip-references.md new file mode 100644 index 0000000..3fec643 --- /dev/null +++ b/test/cases/strip-references.md @@ -0,0 +1,13 @@ +[1]: http://www.google.co.uk + +[http://www.google.co.uk]: http://www.google.co.uk + + + + + +[1]: http://dsurl.stuff/something.jpg + +[1]:http://www.google.co.uk + + [1]:http://www.google.co.uk