OpenZeppelin / highlightjs-cairo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

highlightjs-cairo

NPM Package

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;

About

License:MIT License


Languages

Language:JavaScript 100.0%