mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +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>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -3,6 +3,8 @@ import hljs from "highlight.js/lib/core";
|
|||
|
||||
Vue.directive("highlightjs", {
|
||||
bind(el, binding) {
|
||||
hljs.highlightElement(el);
|
||||
if(!el.classList.contains("plain")) {
|
||||
hljs.highlightElement(el);
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue