work in progress
this is an attempt to get custom syntax-highlighting for grammatical templates, using compromise and codemirror.
npm i compromise-highlight codemirror
Setup
this function accepts a codemirror editor object, that you've already setup. read the codemirror docs on how to do this.
briefly:
then in setup.js
:
const CodeMirror = const highlight = //setup codemirror instancelet editor = CodeMirror //pass it over, with your patterns //run highlighting on initCodeMirror
MIT