FIX: Cooking issue with paragraphs in a list
This commit is contained in:
parent
6406102815
commit
d6589d4c53
|
@ -161,6 +161,12 @@ test("simple quotes", function() {
|
||||||
cooked("- hello\n\n > world\n > eviltrout",
|
cooked("- hello\n\n > world\n > eviltrout",
|
||||||
"<ul><li>hello</li></ul>\n\n<blockquote><p>world<br/>eviltrout</p></blockquote>",
|
"<ul><li>hello</li></ul>\n\n<blockquote><p>world<br/>eviltrout</p></blockquote>",
|
||||||
"it allows quotes within a list.");
|
"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");
|
cooked(" > indent 1\n > indent 2", "<blockquote><p>indent 1<br/>indent 2</p></blockquote>", "allow multiple spaces to indent");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1012,7 +1012,8 @@
|
||||||
firstBlock = contents[0];
|
firstBlock = contents[0];
|
||||||
|
|
||||||
if (firstBlock) {
|
if (firstBlock) {
|
||||||
firstBlock.shift();
|
|
||||||
|
if (isArray(firstBlock)) { 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 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue