RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Handles the pass 2: Conversion
 * During conversion, we'll go over the elements that belong to a list that we've marked as a list to convert, and we'll perform the
 * conversion needed
 */
Handles the pass 2: Conversion
During conversion, we'll go over the elements that belong to a list that we've marked as a list to convert, and we'll perform the
conversion needed
Handles the pass 2 : Conversion During conversion we ' ll go over the elements that belong to a list that we ' ve marked as a list to convert and we ' ll perform the conversion needed
function processNodeConvert(wordConverter) {
    var args = wordConverter.wordConverterArgs;
    args.currentIndex = 0;
    while (args.currentIndex < args.listItems.length) {
        var metadata = args.listItems[args.currentIndex];
        var node = metadata.originalNode;
        var listMetadata = args.lists[metadata.uniqueListId.toString()];
        if (!listMetadata.ignore) {
            var list = getOrCreateListForNode(wordConverter, node, metadata, listMetadata);
            if (list) {
                cleanupListIgnore(node, LOOKUP_DEPTH);
                var li = node.ownerDocument.createElement('LI');
                while (node.firstChild) {
                    li.appendChild(node.firstChild);
                }
                list.appendChild(li);
                node.parentNode.removeChild(node);
                if (listMetadata.tagName == 'UL') {
                    wordConverter.numBulletsConverted++;
                }
                else {
                    wordConverter.numNumberedConverted++;
                }
            }
        }
        args.currentIndex++;
    }
    return wordConverter.numBulletsConverted > 0 || wordConverter.numNumberedConverted > 0;
}
function processNodeConvert ( wordConverter ) { var args = wordConverter . wordConverterArgs ; args . currentIndex = 0 ; while ( args . currentIndex < args . listItems . length ) { var metadata = args . listItems [ args . currentIndex ] ; var node = metadata . originalNode ; var listMetadata = args . lists [ metadata . uniqueListId . toString ( ) ] ; if ( ! listMetadata . ignore ) { var list = getOrCreateListForNode ( wordConverter , node , metadata , listMetadata ) ; if ( list ) { cleanupListIgnore ( node , LOOKUP_DEPTH ) ; var li = node . ownerDocument . createElement ( 'LI' ) ; while ( node . firstChild ) { li . appendChild ( node . firstChild ) ; } list . appendChild ( li ) ; node . parentNode . removeChild ( node ) ; if ( listMetadata . tagName == 'UL' ) { wordConverter . numBulletsConverted ++ ; } else { wordConverter . numNumberedConverted ++ ; } } } args . currentIndex ++ ; } return wordConverter . numBulletsConverted > 0 || wordConverter . numNumberedConverted > 0 ; }
Handles the pass 2: Conversion
 During conversion, we'll go over the elements that belong to a list that we've marked as a list to convert, and we'll perform the
 conversion needed
Handles the pass 2 : Conversion During conversion we ' ll go over the elements that belong to a list that we ' ve marked as a list to convert and we ' ll perform the conversion needed
// We have a list item that we need to convert, get or create the list // that hold this item out // Clean the element out.. this call gets rid of the fake bullet and unneeded nodes // Create a new list item and transfer the children // Append the list item into the list // Remove the node we just converted