mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Revert "FIX: Markdown bug", breaks build
This reverts commit 4a32cddf80
.
This commit is contained in:
parent
7603faa20d
commit
08ad5d479e
2 changed files with 2 additions and 7 deletions
|
@ -50,10 +50,6 @@ test("Traditional Line Breaks", function() {
|
||||||
cooked(input, traditionalOutput, "It supports traditional markdown via a Site Setting");
|
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", "<p><a href=\"http://eviltrout.com\">evil_trout</a> hello_</p>");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("Line Breaks", function() {
|
test("Line Breaks", function() {
|
||||||
cooked("[] first choice\n[] second choice",
|
cooked("[] first choice\n[] second choice",
|
||||||
"<p>[] first choice<br/>[] second choice</p>",
|
"<p>[] first choice<br/>[] second choice</p>",
|
||||||
|
|
5
vendor/assets/javascripts/better_markdown.js
vendored
5
vendor/assets/javascripts/better_markdown.js
vendored
|
@ -643,8 +643,7 @@
|
||||||
var DialectHelpers = {};
|
var DialectHelpers = {};
|
||||||
DialectHelpers.inline_until_char = function( text, want ) {
|
DialectHelpers.inline_until_char = function( text, want ) {
|
||||||
var consumed = 0,
|
var consumed = 0,
|
||||||
nodes = [],
|
nodes = [];
|
||||||
patterns = this.dialect.inline.__patterns__.replace('|_|', '');
|
|
||||||
|
|
||||||
while ( true ) {
|
while ( true ) {
|
||||||
if ( text.charAt( consumed ) === want ) {
|
if ( text.charAt( consumed ) === want ) {
|
||||||
|
@ -658,7 +657,7 @@
|
||||||
return null;
|
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 ];
|
consumed += res[ 0 ];
|
||||||
// Add any returned nodes.
|
// Add any returned nodes.
|
||||||
nodes.push.apply( nodes, res.slice( 1 ) );
|
nodes.push.apply( nodes, res.slice( 1 ) );
|
||||||
|
|
Loading…
Reference in a new issue