RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * The node processing is based on the premise of only ol/ul is in ListContainerWrapper class
 * However the html might be melformed, this function is to split all the other elements out of ListContainerWrapper
 * @param doc pasted document that contains all the list element.
 */
The node processing is based on the premise of only ol/ul is in ListContainerWrapper class
However the html might be melformed, this function is to split all the other elements out of ListContainerWrapper
@param doc pasted document that contains all the list element.
The node processing is based on the premise of only ol / ul is in ListContainerWrapper class However the html might be melformed this function is to split all the other elements out of ListContainerWrapper @param doc pasted document that contains all the list element .
function sanitizeListItemContainer(doc) {
    var listItemContainerListEl = doc.querySelectorAll(constants_1.WORD_ORDERED_LIST_SELECTOR + ", " + constants_1.WORD_UNORDERED_LIST_SELECTOR);
    listItemContainerListEl.forEach(function (el) {
        var replaceRegex = new RegExp("\\b" + constants_1.LIST_CONTAINER_ELEMENT_CLASS_NAME + "\\b", 'g');
        if (el.previousSibling) {
            var prevParent = roosterjs_editor_dom_1.splitParentNode(el, true);
            prevParent.className = prevParent.className.replace(replaceRegex, '');
        }
        if (el.nextSibling) {
            var nextParent = roosterjs_editor_dom_1.splitParentNode(el, false);
            nextParent.className = nextParent.className.replace(replaceRegex, '');
        }
    });
}
function sanitizeListItemContainer ( doc ) { var listItemContainerListEl = doc . querySelectorAll ( constants_1 . WORD_ORDERED_LIST_SELECTOR + ", " + constants_1 . WORD_UNORDERED_LIST_SELECTOR ) ; listItemContainerListEl . forEach ( function ( el ) { var replaceRegex = new RegExp ( "\\b" + constants_1 . LIST_CONTAINER_ELEMENT_CLASS_NAME + "\\b" , 'g' ) ; if ( el . previousSibling ) { var prevParent = roosterjs_editor_dom_1 . splitParentNode ( el , true ) ; prevParent . className = prevParent . className . replace ( replaceRegex , '' ) ; } if ( el . nextSibling ) { var nextParent = roosterjs_editor_dom_1 . splitParentNode ( el , false ) ; nextParent . className = nextParent . className . replace ( replaceRegex , '' ) ; } } ) ; }
The node processing is based on the premise of only ol/ul is in ListContainerWrapper class
 However the html might be melformed, this function is to split all the other elements out of ListContainerWrapper
 @param doc pasted document that contains all the list element.
The node processing is based on the premise of only ol / ul is in ListContainerWrapper class However the html might be melformed this function is to split all the other elements out of ListContainerWrapper @param doc pasted document that contains all the list element .