mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Instead of patching markdown-js, fix the issue in Discourse.
This commit is contained in:
@@ -41,7 +41,10 @@ Discourse.Dialect.registerBlock('html', function(block, next) {
|
|||||||
var tag = m[1].split(/\s/);
|
var tag = m[1].split(/\s/);
|
||||||
if (tag && tag[0] && blockTags.indexOf(tag[0]) !== -1) {
|
if (tag && tag[0] && blockTags.indexOf(tag[0]) !== -1) {
|
||||||
split = splitAtLast(tag[0], block, next);
|
split = splitAtLast(tag[0], block, next);
|
||||||
if (split) { return split; }
|
if (split) {
|
||||||
|
if (split.length === 1 && split[0] === block) { return; }
|
||||||
|
return split;
|
||||||
|
}
|
||||||
return [ block.toString() ];
|
return [ block.toString() ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/assets/javascripts/better_markdown.js
vendored
2
vendor/assets/javascripts/better_markdown.js
vendored
@@ -1013,7 +1013,7 @@
|
|||||||
|
|
||||||
if (firstBlock) {
|
if (firstBlock) {
|
||||||
|
|
||||||
if (isArray(firstBlock)) { firstBlock.shift(); }
|
firstBlock.shift();
|
||||||
contents.splice.apply(contents, [0, 1].concat(firstBlock));
|
contents.splice.apply(contents, [0, 1].concat(firstBlock));
|
||||||
add( last_li, loose, contents, nl );
|
add( last_li, loose, contents, nl );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user