third_party/vinn/third_party/parse5/lib/tree_construction/parser.js
function callAdoptionAgency(p, token) {
    for (var i = 0; i < AA_OUTER_LOOP_ITER; i++) {
        var formattingElementEntry = aaObtainFormattingElementEntry(p, token, formattingElementEntry);

        if (!formattingElementEntry)
            break;

        var furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);

        if (!furthestBlock)
            break;

        p.activeFormattingElements.bookmark = formattingElementEntry;

        var lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element),
            commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);

        p.treeAdapter.detachNode(lastElement);
        aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);
        aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);
    }
}
function callAdoptionAgency(p, token) {
    for (var i = 0; i < AA_OUTER_LOOP_ITER; i++) {
        var formattingElementEntry = aaObtainFormattingElementEntry(p, token, formattingElementEntry);

        if (!formattingElementEntry)
            break;

        var furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);

        if (!furthestBlock)
            break;

        p.activeFormattingElements.bookmark = formattingElementEntry;

        var lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element),
            commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);

        p.treeAdapter.detachNode(lastElement);
        aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);
        aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);
    }
}
function callAdoptionAgency ( p , token ) { for ( var i = 0 ; i < AA_OUTER_LOOP_ITER ; i ++ ) { var formattingElementEntry = aaObtainFormattingElementEntry ( p , token , formattingElementEntry ) ; if ( ! formattingElementEntry ) break ; var furthestBlock = aaObtainFurthestBlock ( p , formattingElementEntry ) ; if ( ! furthestBlock ) break ; p . activeFormattingElements . bookmark = formattingElementEntry ; var lastElement = aaInnerLoop ( p , furthestBlock , formattingElementEntry . element ) , commonAncestor = p . openElements . getCommonAncestor ( formattingElementEntry . element ) ; p . treeAdapter . detachNode ( lastElement ) ; aaInsertLastNodeInCommonAncestor ( p , commonAncestor , lastElement ) ; aaReplaceFormattingElement ( p , furthestBlock , formattingElementEntry ) ; } }
Algorithm entry point
Algorithm entry point