highlightjs-motoko
v1.0.3
Published
highlight.js syntax definition for the Motoko programming language
Downloads
149
Maintainers
Readme
highlightjs-motoko
highlight.js syntax definitions for Motoko and related languages.
Installation
npm i --save highlightjs-motoko
Basic Usage
const hljs = require('highlightjs');
const defineMotoko = require('highlightjs-motoko');
defineMotoko(hljs);
hljs.highlightAll();
Advanced Usage
const hljs = require('highlightjs');
const { motoko, candid } = require('highlightjs-motoko');
// Individually register each language
hljs.registerLanguage('motoko', motoko);
hljs.registerLanguage('candid', candid);
hljs.highlightAll();