UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

2 lines (1 loc) 760 B
var a=Object.defineProperty;var s=(t,e)=>a(t,"name",{value:e,configurable:!0});import{html as u}from"./render.js";import{LEVEL_KEY as i,STYLE_KEY as o,TYPE_KEY as p}from"../constants.js";function b(t){return!!(t&&(t.name==="ol"||t.name==="ul"))}s(b,"isList");function c(t){return!!(t&&t.name==="li")}s(c,"isLeaf");function E(t){return t.name!=="li"&&/mso-list:\s*l\d+ level\d+ lfo\d+/i.test(t.attributes.style)||/msolistparagraph/i.test(t.attributes.class)&&!!t.find(e=>e.isComment&&u(e).includes("supportLists")).length}s(E,"isPseudoLeaf");function L(t,e){const n=t.attributes[p],r=t.attributes[o];return!(e.name!==n||e.attributes[o]!==r||t.attributes[i]!==e.attributes[i])}s(L,"isSameType");export{c as isLeaf,b as isList,E as isPseudoLeaf,L as isSameType};