function duplicateMultilineNode (element) {
    let className = element.className;

    if ( ! /hljs-/.test(className)) return;

    let lines = getLines(element.innerHTML);

    let result = '';

    for (let i = 0; i < lines.length; i++) {
        let lineText = lines[i].length > 0 ? lines[i] : ' ';
        result += format('<span class="{0}">{1}</span>\n', [ className,  lineText ]);
    }

    element.innerHTML = result.trim();
}
/**
 * Method for fix multi-line elements implementation in highlight.js
 * @param {HTMLElement} element
 */
Method for fix multi-line elements implementation in highlight.js
@param {HTMLElement} element
Method for fix multi - line elements implementation in highlight . js @param { HTMLElement } element
function duplicateMultilineNode (element) {
    let className = element.className;
    if ( ! /hljs-/.test(className)) return;
    let lines = getLines(element.innerHTML);
    let result = '';
    for (let i = 0; i < lines.length; i++) {
        let lineText = lines[i].length > 0 ? lines[i] : ' ';
        result += format('<span class="{0}">{1}</span>\n', [ className,  lineText ]);
    }
    element.innerHTML = result.trim();
}
function duplicateMultilineNode ( element ) { let className = element . className ; if ( ! / hljs- / . test ( className ) ) return ; let lines = getLines ( element . innerHTML ) ; let result = '' ; for ( let i = 0 ; i < lines . length ; i ++ ) { let lineText = lines [ i ] . length > 0 ? lines [ i ] : ' ' ; result += format ( '<span class="{0}">{1}</span>\n' , [ className , lineText ] ) ; } element . innerHTML = result . trim ( ) ; }
Method for fix multi-line elements implementation in highlight.js
 @param {HTMLElement} element
Method for fix multi - line elements implementation in highlight . js @param { HTMLElement } element