3
0
Fork 0
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:
Ruby 2024-05-08 18:50:14 +02:00
parent 68211168d3
commit bb02fd079c
No known key found for this signature in database
GPG key ID: 74D9DB37B03A4804
2 changed files with 4 additions and 2 deletions

View file

@ -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>

View file

@ -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);
};
},
});