Check out the examples
Format | File |
---|---|
CodeMirror | wenyan.codemirror.js |
Prism | wenyan.prism.js |
TextMate Grammar | wenyan.tmLanguage.json |
Format | File |
---|---|
CodeMirror | wenyan-light.codemirror.css |
Prism | wenyan-light.prism.css |
💡 Replace
codemirror
if you want to use different formats/editors
<!--Highlighter-->
<script src='https://cdn.jsdelivr.net/gh/wenyan-lang/highlight/wenyan.codemirror.js'></script>
<!--Theme-->
<link rel='stylesheet' type='text/css' href='https://cdn.jsdelivr.net/gh/wenyan-lang/highlight/wenyan-light.codemirror.css'>
npm i @wenyan/highlight
require('@wenyan/highlight/wenyan.codemirror')
// or
import '@wenyan/highlight/wenyan.codemirror'
The syntax highlighter are generated from the language syntax definition. Rebuild by
npm run build