highlightjs-cairo
v0.4.0
Published
highlight.js syntax definition for Cairo
Downloads
457
Maintainers
Readme
highlightjs-cairo
Cairo language definition for highlight.js.
Install
npm i highlight.js highlightjs-cairo
Usage
Browser:
<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/cairo.min.js"></script>
<script type="text/javascript">
hljs.highlightAll();
</script>
Node (Highlight.js v9):
const hljs = require('highlight.js');
const hljsDefineCairo = require('highlightjs-cairo');
hljsDefineCairo(hljs);
const highlighted = hljs.highlight('cairo', source).value;
Node (Highlight.js v11):
const hljs = require('highlight.js/lib/core');
const hljsDefineCairo = require('highlightjs-cairo');
hljsDefineCairo(hljs);
const highlighted = hljs.highlight(source, {language: 'cairo'}).value;