highlightjs-jexl
v0.0.5
Published
Jexl plugin for highlight.js
Downloads
728
Maintainers
Readme
highlightjs-jexl
This adds support for Jexl to highlightjs.
Usage
This module exports a function hljsDefineJexl
- call it with the argument hljs
to register Jexl support in highlight.js!
import hljs from "highlight.js";
import hljsDefineJexl from "highlightjs-jexl";
hljsDefineJexl(hljs);
hljs.highlightAll();
If you're not using a build system and just want to embed this in your webpage:
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/highlightjs-jexl/dist/highlightjs-jexl.min.js"></script>
<script>
window.hljsDefineJexl(hljs);
hljs.highlightAll();
</script>
See this fiddle for a complete example.