function pageToC() {
    let headings = document.querySelectorAll(`.markdown-section ${window.$docsify['page-toc'].target}`);
    let toc_top = 
`<div class="page-toc">
 <p class="_title">Contents</p>`;

    let list = [];
    if (headings) {
        headings.forEach(heading => {
            let item = generateToC(heading.tagName.replace(/h/gi, ''), heading.innerHTML);
            if (item)
                list.push(item);
        });
    }

    if (list.length) {
        return `${toc_top}
            ${list.join('\n')}
            </div>`;
    }
    return '';
}
/**
 * Collects headings and compiles into HTML
 * @return {string} Compiled html
 */
Collects headings and compiles into HTML
@return {string} Compiled html
Collects headings and compiles into HTML @return { string } Compiled html
function pageToC() {
    let headings = document.querySelectorAll(`.markdown-section ${window.$docsify['page-toc'].target}`);
    let toc_top = 
`<div class="page-toc">
 <p class="_title">Contents</p>`;
    let list = [];
    if (headings) {
        headings.forEach(heading => {
            let item = generateToC(heading.tagName.replace(/h/gi, ''), heading.innerHTML);
            if (item)
                list.push(item);
        });
    }
    if (list.length) {
        return `${toc_top}
            ${list.join('\n')}
            </div>`;
    }
    return '';
}
function pageToC ( ) { let headings = document . querySelectorAll ( ` ${ window . $docsify [ 'page-toc' ] . target } ` ) ; let toc_top = ` ` ; let list = [ ] ; if ( headings ) { headings . forEach ( heading => { let item = generateToC ( heading . tagName . replace ( / h / gi , '' ) , heading . innerHTML ) ; if ( item ) list . push ( item ) ; } ) ; } if ( list . length ) { return ` ${ toc_top } ${ list . join ( '\n' ) } ` ; } return '' ; }
Collects headings and compiles into HTML
 @return {string} Compiled html
Collects headings and compiles into HTML @return { string } Compiled html