Added docs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user