highlightjs / highlightjs/vue-plugin
Highlight.js Vue Plugin systematically ignores language value passed to it
- Dominant language
- TypeScript
- Stars
- 241
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Whether I call the plugin directly from my template section or mount it programmatically and passing to it a language prop value, the language I specify always ends up being ignored by the plugin who instead chooses himself a language.
From template section:
``
From script section (programmatically):
```
// some code here...
nextTick(() => {
mount(HighlightPlugin.component, {
element: document.querySelector('.myElement'),
props: {
language: 'javascript',
code: codeSnippet
}
})
})
```
Here's how the plugin is imported in my main.js:
```
import 'highlight.js/styles/github-dark-dimmed.css'
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'
app.use(hljsVuePlugin)
app.mount('#app')
```
Contributor guide
Assessment
This issue has not been assessed yet.