3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

fix(docs): hljs depcrecation and new directive

couldn't figure out how to get hljs-vue to work so this was just the
easiest way to fix it
This commit is contained in:
Ruby 2024-05-08 16:32:43 +02:00
parent b28ca170ed
commit 9ee0378d4e
3 changed files with 11 additions and 2 deletions

View file

@ -18,7 +18,7 @@
elem.parentNode.classList.add('codeblock');
}
hljs.highlightBlock(elem);
hljs.highlightElement(elem);
});
}
},

View file

@ -0,0 +1,8 @@
import Vue from "vue";
import hljs from "highlight.js/lib/core";
Vue.directive("highlightjs", {
bind(el, binding) {
hljs.highlightElement(el)
},
});

View file

@ -4,13 +4,14 @@ import Vue from "vue";
import VueHighlightJS from "@highlightjs/vue-plugin";
import hljs from "highlight.js/lib/core";
import hljsYaml from "highlight.js/lib/languages/yaml.js";
import hljsYaml from "highlight.js/lib/languages/yaml";
import "highlight.js/styles/base16/ocean.css";
import { router } from "./routes";
import { RootStore } from "./store";
import "./directives/trim-indents";
import "./directives/highlightjs";
import App from "./components/App.vue";