Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rvanasa/highlightjs-motoko
Syntax highlighting for the Motoko programming language
https://github.com/rvanasa/highlightjs-motoko
Last synced: about 2 months ago
JSON representation
Syntax highlighting for the Motoko programming language
- Host: GitHub
- URL: https://github.com/rvanasa/highlightjs-motoko
- Owner: rvanasa
- License: apache-2.0
- Created: 2023-02-13T21:55:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T19:24:16.000Z (6 months ago)
- Last Synced: 2024-07-09T22:23:11.543Z (6 months ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `highlightjs-motoko`
> #### [highlight.js](https://github.com/highlightjs/highlight.js) syntax definitions for [Motoko](https://internetcomputer.org/docs/current/motoko/main/about-this-guide) and related languages.
---
## Installation
```bash
npm i --save highlightjs-motoko
```## Basic Usage
```js
const hljs = require('highlightjs');
const defineMotoko = require('highlightjs-motoko');defineMotoko(hljs);
hljs.highlightAll();
```## Advanced Usage
```js
const hljs = require('highlightjs');
const { motoko, candid } = require('highlightjs-motoko');// Individually register each language
hljs.registerLanguage('motoko', motoko);
hljs.registerLanguage('candid', candid);hljs.highlightAll();
```