mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Cooking issue with paragraphs in a list
This commit is contained in:
parent
6406102815
commit
d6589d4c53
2 changed files with 8 additions and 1 deletions
|
@ -161,6 +161,12 @@ test("simple quotes", function() {
|
|||
cooked("- hello\n\n > world\n > eviltrout",
|
||||
"<ul><li>hello</li></ul>\n\n<blockquote><p>world<br/>eviltrout</p></blockquote>",
|
||||
"it allows quotes within a list.");
|
||||
|
||||
cooked("- <p>eviltrout</p>",
|
||||
"<ul><li><p>eviltrout</p></li></ul>",
|
||||
"it allows paragraphs within a list.");
|
||||
|
||||
|
||||
cooked(" > indent 1\n > indent 2", "<blockquote><p>indent 1<br/>indent 2</p></blockquote>", "allow multiple spaces to indent");
|
||||
|
||||
});
|
||||
|
|
3
vendor/assets/javascripts/better_markdown.js
vendored
3
vendor/assets/javascripts/better_markdown.js
vendored
|
@ -1012,7 +1012,8 @@
|
|||
firstBlock = contents[0];
|
||||
|
||||
if (firstBlock) {
|
||||
firstBlock.shift();
|
||||
|
||||
if (isArray(firstBlock)) { firstBlock.shift(); }
|
||||
contents.splice.apply(contents, [0, 1].concat(firstBlock));
|
||||
add( last_li, loose, contents, nl );
|
||||
|
||||
|
|
Loading…
Reference in a new issue