fix(horizontal rule): revert backwards incompatibility change

Horizontal rule syntax allows up to 3 spaces preceding dashes or
asterisks. Commit da8fb53 wrongfully removed that. This commit
puts that back.

Closes #317
This commit is contained in:
Estevao Soares dos Santos 2016-12-20 22:08:33 +00:00
parent cf2a9075ae
commit 113f5f64b1
7 changed files with 8 additions and 3 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -14,9 +14,9 @@ showdown.subParser('blockGamut', function (text, options, globals) {
// Do Horizontal Rules: // Do Horizontal Rules:
var key = showdown.subParser('hashBlock')('<hr />', options, globals); var key = showdown.subParser('hashBlock')('<hr />', options, globals);
text = text.replace(/^( ?-){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key);
text = text.replace(/^( ?\*){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key);
text = text.replace(/^( ?_){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key);
text = showdown.subParser('lists')(text, options, globals); text = showdown.subParser('lists')(text, options, globals);
text = showdown.subParser('codeBlocks')(text, options, globals); text = showdown.subParser('codeBlocks')(text, options, globals);

View File

@ -0,0 +1,2 @@
<hr />
<hr />

View File

@ -0,0 +1,3 @@
---
- - -