]> BookStack Code Mirror - bookstack/blob - resources/js/components/code-highlighter.js
Merge branch 'development' of github.com:BookStackApp/BookStack into development
[bookstack] / resources / js / components / code-highlighter.js
1 import {Component} from './component';
2
3 export class CodeHighlighter extends Component {
4
5     setup() {
6         const container = this.$el;
7
8         const codeBlocks = container.querySelectorAll('pre');
9         if (codeBlocks.length > 0) {
10             window.importVersioned('code').then(Code => {
11                 Code.highlightWithin(container);
12             });
13         }
14     }
15
16 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.