1.1.0 • Published 1 year ago

highlightjs-modelica v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Modelica language support for highlight.js

Adds syntax highlighting to highlight.js for Modelica files.

The grammar is from the Modelica grammar for Sublime Text by Boris Chumichev.

Usage

const hljs = require('highlight.js')
const modelica = require('highlightjs-modelica')

hljs.registerLanguage('modelica', modelica)

const code = `
package Components "Contains different components"
extends Modelica.Icons.Library2;
  import SI= Modelica.SIunits;
// ...
`

const value = hljs.highlight('modelica', code, true).value

License

Copyright (c) 2019- commenthol (MIT License)

See LICENSE for more info.