Created
March 28, 2019 08:20
-
-
Save KMR-zoar/8286790fdd50c5d436f9db3f23cdadd8 to your computer and use it in GitHub Desktop.
simpleMatch for Brackets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CodeMirror from 'codemirror' | |
CodeMirror.defineMode('law', () => { | |
return { | |
token: (stream, state) => { | |
const inBrackets = stream.match(/(.*?)/) | |
if (inBrackets) { | |
return 'keyword' | |
} | |
stream.next() | |
return null | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment