Added docs

This commit is contained in:
2023-04-26 13:42:09 +02:00
parent 3eaa2b4fa6
commit caec81a8b5

View File

@@ -2,6 +2,16 @@
* This file contains scripts needed for syntax highlight to work.
*/
/**
* This functions highlight element with provided ID.
*
* @function
* @name highlightSyntax
* @kind function
* @param {any} elementId
* @returns {void}
*/
function highlightSyntax(elementId) {
const element = document.getElementById(elementId);
element.innerHTML = hljs.highlightAuto(element.innerText).value