diff --git a/test/javascripts/lib/markdown_test.js b/test/javascripts/lib/markdown_test.js index d3c3ba1b7..c5cdc6108 100644 --- a/test/javascripts/lib/markdown_test.js +++ b/test/javascripts/lib/markdown_test.js @@ -50,10 +50,6 @@ test("Traditional Line Breaks", function() { cooked(input, traditionalOutput, "It supports traditional markdown via a Site Setting"); }); -test("Unbalanced underscores", function() { - cooked("[evil_trout][1] hello_\n\n[1]: http://eviltrout.com", "

evil_trout hello_

"); -}); - test("Line Breaks", function() { cooked("[] first choice\n[] second choice", "

[] first choice
[] second choice

", diff --git a/vendor/assets/javascripts/better_markdown.js b/vendor/assets/javascripts/better_markdown.js index 304606cdd..93555f4c5 100644 --- a/vendor/assets/javascripts/better_markdown.js +++ b/vendor/assets/javascripts/better_markdown.js @@ -643,8 +643,7 @@ var DialectHelpers = {}; DialectHelpers.inline_until_char = function( text, want ) { var consumed = 0, - nodes = [], - patterns = this.dialect.inline.__patterns__.replace('|_|', ''); + nodes = []; while ( true ) { if ( text.charAt( consumed ) === want ) { @@ -658,7 +657,7 @@ return null; } - var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ), patterns ); + var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ) ); consumed += res[ 0 ]; // Add any returned nodes. nodes.push.apply( nodes, res.slice( 1 ) );