diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js
index b4b0b530..43c99af2 100644
--- a/source/Ox/js/HTML.js
+++ b/source/Ox/js/HTML.js
@@ -372,6 +372,10 @@
Ox.parseMarkdown Parses (a tiny subset of) Markdown.
> Ox.parseMarkdown('*foo* **bar** `baz` ``back`tick``')
'foo bar baz
back`tick
'
+ > Ox.parseMarkdown('foo\n\nbar\n\nbaz')
+ 'foo
bar
baz'
+ > Ox.parseMarkdown('\n```foo\n\nbar\n\nbaz\n```')
+ 'bar
baz
'
> Ox.parseMarkdown('')
'http://example.com'
> Ox.parseMarkdown('[example](http://example.com "example.com")')
@@ -390,7 +394,6 @@
Ox.parseMarkdown = function(string) {
// see https://github.com/coreyti/showdown/blob/master/src/showdown.js
return string.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
- .replace(/\n\n/g, '
')
.replace(
/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
'$2'
@@ -431,7 +434,8 @@
function(match, mail) {
return Ox.encodeEmailAddress(mail);
}
- );
+ )
+ .replace(/\n\n/g, '
');
};
/*@