https://github.com/nhomble/highlightjs-ocl
highlight.js syntax definition for object constraint language
https://github.com/nhomble/highlightjs-ocl
Last synced: 2 months ago
JSON representation
highlight.js syntax definition for object constraint language
- Host: GitHub
- URL: https://github.com/nhomble/highlightjs-ocl
- Owner: nhomble
- License: mit
- Created: 2020-05-10T04:42:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T11:42:38.000Z (12 months ago)
- Last Synced: 2025-02-09T03:14:00.019Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# highlightjs-ocl

This project registers the [Object Constraint Language](https://www.omg.org/spec/OCL) for [highlight.js](https://github.com/highlightjs/highlight.js/)
## Usage
### unpkg
```html```
which links to a [minified version](https://unpkg.com/[email protected]/dist/ocl.min.js) of ```ocl.js``` which depends on ```hljs``` being available.
### node
```javascript
import hljs from 'highlight.js';
import hljsocl from 'highlightjs-ocl'hljs.registerLanguage('ocl', hljsocl);
hljs.initHighlightingOnLoad();
```## Building
Go to [highlight.js](https://github.com/highlightjs/highlight.js) and update ```ocl.js``` directly into the library. Then run their build tool
```shell script
$ node ./tools/build.js ocl
```