X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;fp=roojs-bootstrap-debug.js;h=3919fe16fc05f961bc33f12c31c91f2c340497a9;hp=98a354fcf515ce2a0ec9d19687b2e7baf0277c22;hb=51ed2845f5c09276c637c52a110fac3756b69493;hpb=e798798e6ba01bd90ccd727ff751e74d8e93087e diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 98a354fcf5..3919fe16fc 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -26630,7 +26630,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); @@ -26664,20 +26663,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;