FIX: Cooking issue with paragraphs in a list

This commit is contained in:
Robin Ward 2014-07-15 16:41:53 -04:00
parent 6406102815
commit d6589d4c53
2 changed files with 8 additions and 1 deletions

View file

@ -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");
});

View file

@ -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 );