BookStackApp_BookStack/resources/js/components/code-highlighter.js
Dan Brown e711290d8b
Ran eslint fix on existing codebase
Had to do some manual fixing of the app.js file due to misplaced
comments
2023-04-18 22:20:02 +01:00

17 lines
382 B
JavaScript

import {Component} from './component';
export class CodeHighlighter extends Component {
setup() {
const container = this.$el;
const codeBlocks = container.querySelectorAll('pre');
if (codeBlocks.length > 0) {
window.importVersioned('code').then(Code => {
Code.highlightWithin(container);
});
}
}
}