mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
respect code-lang=plain
This commit is contained in:
parent
68211168d3
commit
bb02fd079c
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<pre class="codeblock" v-highlightjs><code :class="codeLang" v-trim-indents="trim"><slot></slot></code></pre>
|
<pre class="codeblock"><code :class="codeLang" v-trim-indents="trim" v-highlightjs><slot></slot></code></pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -3,6 +3,8 @@ import hljs from "highlight.js/lib/core";
|
||||||
|
|
||||||
Vue.directive("highlightjs", {
|
Vue.directive("highlightjs", {
|
||||||
bind(el, binding) {
|
bind(el, binding) {
|
||||||
hljs.highlightElement(el);
|
if(!el.classList.contains("plain")) {
|
||||||
|
hljs.highlightElement(el);
|
||||||
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue