Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

highlightjs-svelte

1.0.4 • Public • Published

highlightjs-svelte

Svelte language definition for Highlight.js

install

npm i highlight.js highlightjs-svelte

usage

browser

<script src="https://cdn.jsdelivr.net/npm/highlightjs"></script>
<script src="https://cdn.jsdelivr.net/npm/highlightjs-svelte"></script>
<script>
  hljs.registerLanguage("svelte", window.hljsDefineSvelte);
  hljs.initHighlightingOnLoad();
</script> 
 

node

const hljs = require('highlight.js');
const hljs_svelte = require('highlightjs-svelte');
 
hljs_svelte(hljs);
 
const highlighted = hljs.highlight('svelte', source).value;

Install

npm i highlightjs-svelte

DownloadsWeekly Downloads

72

Version

1.0.4

License

MIT

Unpacked Size

4.15 kB

Total Files

5

Last publish

Collaborators

  • avatar