Fixed problem with list wiki rule

This commit is contained in:
Jeremy Ruston 2011-12-08 16:19:02 +00:00
parent 3bef25194c
commit 6d727437e7
1 changed files with 4 additions and 1 deletions

View File

@ -283,7 +283,10 @@ WikiTextRules.rules = [
var t,e;
if(listLevel > currLevel) {
for(t=currLevel; t<listLevel; t++) {
var target = (currLevel === 0) ? stack[stack.length-1] : stack[stack.length-1].lastChild;
var target = stack[stack.length-1];
if(currLevel !== 0 && target.children) {
target = target.children[target.children.length-1];
}
e = {type: listType, children: []};
target.push(e);
stack.push(e.children);