a2bcf765a8
Added a cache-compatible module loading system/pattern to the codebase.
14 lines
No EOL
311 B
JavaScript
14 lines
No EOL
311 B
JavaScript
class CodeHighlighter {
|
|
|
|
constructor(elem) {
|
|
const codeBlocks = elem.querySelectorAll('pre');
|
|
if (codeBlocks.length > 0) {
|
|
window.importVersioned('code').then(Code => {
|
|
Code.highlightWithin(elem);
|
|
});
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
export default CodeHighlighter; |