mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-02 13:58:57 +08:00
e711290d8b
Had to do some manual fixing of the app.js file due to misplaced comments
17 lines
382 B
JavaScript
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);
|
|
});
|
|
}
|
|
}
|
|
|
|
}
|