mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 05:55:40 +08:00
FIX: Markdown javascript error with certain formatting.
This commit is contained in:
parent
3e72de7dc1
commit
4da76aab96
22
vendor/assets/javascripts/better_markdown.js
vendored
22
vendor/assets/javascripts/better_markdown.js
vendored
@ -1011,18 +1011,20 @@
|
|||||||
var contents = this.processBlock(li_accumulate, []),
|
var contents = this.processBlock(li_accumulate, []),
|
||||||
firstBlock = contents[0];
|
firstBlock = contents[0];
|
||||||
|
|
||||||
firstBlock.shift();
|
if (firstBlock) {
|
||||||
contents.splice.apply(contents, [0, 1].concat(firstBlock));
|
firstBlock.shift();
|
||||||
add( last_li, loose, contents, nl );
|
contents.splice.apply(contents, [0, 1].concat(firstBlock));
|
||||||
|
add( last_li, loose, contents, nl );
|
||||||
|
|
||||||
// Let's not creating a trailing \n after content in the li
|
// Let's not creating a trailing \n after content in the li
|
||||||
if(last_li[last_li.length-1] === "\n") {
|
if(last_li[last_li.length-1] === "\n") {
|
||||||
last_li.pop();
|
last_li.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loose mode will have been dealt with. Reset it
|
||||||
|
loose = false;
|
||||||
|
li_accumulate = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loose mode will have been dealt with. Reset it
|
|
||||||
loose = false;
|
|
||||||
li_accumulate = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look at the next block - we might have a loose list. Or an extra
|
// Look at the next block - we might have a loose list. Or an extra
|
||||||
|
Loading…
x
Reference in New Issue
Block a user