1.4.0 • Published 6 months ago

highlightjs-odinlang v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Highlight.js syntax definition for Odin programming language

Usage

Simply include the Highlight.js library in your webpage or Node app, then load this module.

Static website or simple usage

Simply load the module after loading Highlight.js. You'll use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/highlightjs-odin/dist/odin.min.js"></script>
<script type="text/javascript">
  hljs.highlightAll();
</script>

Using directly from the UNPKG CDN

Common JS

<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css">
<script type="text/javascript" src="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/highlight.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/highlightjs-odinlang@1.4.0/dist/odin.min.js"></script>

ES6 Modules

<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css">
<script type="module">
import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.11.1/es/highlight.min.js';
import hljsOdin from 'https://unpkg.com/highlightjs-odinlang@1.4.0/dist/odin.es.min.js';
hljs.registerLanguage('odin', hljsOdin);
</script>

With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.

var hljs = require('highlight.js');
var hljsOdin = require('highlightjs-odinlang');

// or with ES modules
import hljs from 'highlight.js';
import hljsOdin from "highlightjs-odinlang"

hljs.registerLanguage("odin", hljsOdin);
hljs.highlightAll();
1.4.0

6 months ago

1.3.3

6 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.3.0

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago