MCPcopy Create free account
hub / github.com/sql-js/sql.js / initHighlighting

Function initHighlighting

documentation/javascript/application.js:683–693  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

681 Applies highlighting to all <pre><code>..</code></pre> blocks on a page.
682 */
683 function initHighlighting() {
684 if (initHighlighting.called)
685 return;
686 initHighlighting.called = true;
687 var pres = document.getElementsByTagName('pre');
688 for (var i = 0; i < pres.length; i++) {
689 var code = findCode(pres[i]);
690 if (code)
691 highlightBlock(code, hljs.tabReplace);
692 }
693 }
694
695 /*
696 Attaches highlighting to the page load event.

Callers

nothing calls this directly

Calls 2

findCodeFunction · 0.85
highlightBlockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…