Skip to content

AlexxNB/highlightjs-svelte

Repository files navigation

highlightjs-svelte

Svelte language definition for Highlight.js

install

npm i highlight.js highlightjs-svelte

usage

browser

<script src="https://unpkg.com/highlightjs"></script>
<script src="https://unpkg.com/highlightjs-svelte/dist/svelte.min.js"></script>
<script>
  hljs.initHighlightingOnLoad();
</script>
<pre><code class="svelte">Hello, {name}!</code></pre>

node

const hljs = require('highlight.js');
const hljs_svelte = require('highlightjs-svelte');

hljs_svelte(hljs);

const highlighted = hljs.highlight('svelte', source).value;

About

Svelte Language Definition for Highlight.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published