/g, '>' )
.replaceAll ( /"/g, '"' );
// Adding color span and links
if ( ! theConfig.noSourcesColor ) {
this.#colorizeJSKeywords ( );
this.#setClassesLinks ( );
this.#setVariablesLinks ( );
}
// creating the file content in a html table
let lineCounter = 0;
html += '<table class="srcCode">';
// splitting file into lines
this.#fileContent.split ( /\r\n|\r|\n/ ).forEach (
line => {
// and adding a row in the html table
lineCounter ++;
const strLineCounter = String ( lineCounter ).padStart ( 5, '_' );
html +=
`<tr><td><a id="L${strLineCounter}">${lineCounter}</a></td>` +
`<td><pre>${line}</pre></td></tr>`;
}
);
html += '</table>';
// footer
html += navHtmlBuilder.footer;
html +=
'<script>document.getElementById ( new URL ( window.location' +
' ).hash.substring( 1 ) )?.parentNode.classList.add ( \'hash\' )</script>';
html += '</body></html>';
// write file
new FileWriter ( ).write ( dirs, htmlFileName, html );
}
}
export default SourceHtmlBuilder;
/* --- End of file --------------------------------------------------------------------------------------------------------- */