function duplicateMultilineNodes (element) {
    let nodes = element.childNodes;
    for (let node in nodes) {
        // eslint-disable-next-line no-prototype-builtins
        if (nodes.hasOwnProperty(node)) {
            let child = nodes[node];
            if (getLinesCount(child.textContent) > 0) {
                if (child.childNodes.length > 0) {
                    duplicateMultilineNodes(child);
                } else {
                    duplicateMultilineNode(child.parentNode);
                }
            }
        }
    }
}
/**
 * Recursive method for fix multi-line elements implementation in highlight.js
 * Doing deep passage on child nodes.
 * @param {HTMLElement} element
 */
Recursive method for fix multi-line elements implementation in highlight.js
Doing deep passage on child nodes.
Recursive method for fix multi - line elements implementation in highlight . js Doing deep passage on child nodes .
function duplicateMultilineNodes (element) {
    let nodes = element.childNodes;
    for (let node in nodes) {
        if (nodes.hasOwnProperty(node)) {
            let child = nodes[node];
            if (getLinesCount(child.textContent) > 0) {
                if (child.childNodes.length > 0) {
                    duplicateMultilineNodes(child);
                } else {
                    duplicateMultilineNode(child.parentNode);
                }
            }
        }
    }
}
function duplicateMultilineNodes ( element ) { let nodes = element . childNodes ; for ( let node in nodes ) { if ( nodes . hasOwnProperty ( node ) ) { let child = nodes [ node ] ; if ( getLinesCount ( child . textContent ) > 0 ) { if ( child . childNodes . length > 0 ) { duplicateMultilineNodes ( child ) ; } else { duplicateMultilineNode ( child . parentNode ) ; } } } } }
Recursive method for fix multi-line elements implementation in highlight.js
 Doing deep passage on child nodes.
Recursive method for fix multi - line elements implementation in highlight . js Doing deep passage on child nodes .
// eslint-disable-next-line no-prototype-builtins