Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 712 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 712 Bytes

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();