X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;fp=roojs-ui-debug.js;h=4a9967c66210f0b7ef916f005d7a8325fa220040;hp=4f5f9ac2c859edfbad049dc67a6d7c9f60b029ec;hb=e798798e6ba01bd90ccd727ff751e74d8e93087e;hpb=792f4512f3c3ea5ad56ef9f532acf298e49f5411 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 4f5f9ac2c8..4a9967c662 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21752,7 +21752,6 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, var lvl = 0; var stack = [ ul ]; var last_li = false; - var base_lvl = 0; items.forEach(function(n) { //Roo.log("got innertHMLT=" + n.innerHTML); @@ -21786,20 +21785,18 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, return; } - var nlvl = (style['mso-list'].split(' ')[1].replace(/level/,'') *1) - 1; + var nlvl = Math.min( + stack.length-1, + (style['mso-list'].split(' ')[1].replace(/level/,'') *1) - 1 + ); if (nlvl > lvl) { //new indent - if (last_li) { var nul = doc.createElement('ul'); // what about number lists... last_li.appendChild(nul); stack[nlvl] = nul; - } else { - // occurs when we get a level (1) but no parent - just put all the children on the top most.. - stack[nlvl] = stack[stack.length-1]; - } } lvl = nlvl;