-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I need to use the directive mode, however, it doesn't work.
I noticed the codesandbox (here) has an example using the directive mode. You should just need to comment out <component-example/> and uncomment the directive one.
However the code for DirectiveExample.vue is wrong, it should be:
<template>
<div>
<h2>vue-code-highlight example</h2>
<div v-highlight>
<pre class="language-javascript">
<code>
let isPalindrome = (word) => {
let [length, result] = [word.length, true];
for (let i = 0; i < length / 2; i++) {
if (word[i] !== word[length - 1 - i]) result = false;
}
return result;
}
module.exports = isPalindrome;
</code>
</pre>
</div>
</div>
</template>But it gives wrong result (i.e., no syntax highlight)
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed
