An open API service indexing awesome lists of open source software.

https://github.com/highlightjs/highlightjs-lustre

Lustre language grammar for Highlight.js
https://github.com/highlightjs/highlightjs-lustre

Last synced: 3 months ago
JSON representation

Lustre language grammar for Highlight.js

Awesome Lists containing this project

README

          

`highlight.js` syntax definition for Lustre.

For more about highlight.js, see https://highlightjs.org/

For more about Lustre and reactive languages, see
http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/reactive-toolbox/

### Usage

Simply include the `highlight.js` script package in your webpage or node app, load up this module and apply it to `hljs`.

If you're not using a build system and just want to embed this in your webpage:

```html

hljs.registerLanguage('lustre', window.hljsDefineLustre);
hljs.highlightAll();

```

If you're using webpack / rollup / browserify / node:

```javascript
var hljs = require('highlightjs');
var hljsDefineLustre = require('highlightjs-lustre');

hljsDefineLustre(hljs);
hljs.highlightAll();
```

### Advanced

This is a pretty simple package, the only thing you might want to do differently is name the language something other than `lustre`. If you want to do this, simply `import { definer } from 'highlightjs-lustre';` and use it like: `hljs.registerLanguage('othername', definer);`.