diff options
author | n-peugnet <n.peugnet@free.fr> | 2020-04-13 00:50:19 +0200 |
---|---|---|
committer | Vincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com> | 2020-04-13 01:11:37 +0200 |
commit | 5d1d446ff8a7e63562a0cafac6214b473f3f9baf (patch) | |
tree | 75a75e3f8ed76d5eb3c6778c131ade67625f4d50 /src | |
parent | d21055d1e4d84ebb0e0a981ac3a240bbeb14560e (diff) | |
download | wcms-5d1d446ff8a7e63562a0cafac6214b473f3f9baf.tar.gz wcms-5d1d446ff8a7e63562a0cafac6214b473f3f9baf.zip |
fix: un-highlight wsyntax in comments
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/edit.js b/src/edit.js index 7be4c06..86f24c2 100644 --- a/src/edit.js +++ b/src/edit.js @@ -20,6 +20,7 @@ CodeMirror.defineSimpleMode('wcms', { token: 'wcms', next: 'wcms', }, + { regex: /<!--/, token: 'comment', next: 'comment' }, ], // 'wcms' mode, for each macro, if there is parameters, pass to its associated mode wcms: [ @@ -62,6 +63,10 @@ CodeMirror.defineSimpleMode('wcms', { { regex: /path|sortby|order|type/, token: 'wkeyword', push: 'wcms' }, { regex: null, push: 'wcms' }, ], + comment: [ + { regex: /.*?-->/, token: 'comment', next: 'start' }, + { regex: /.*/, token: 'comment' }, + ], }); CodeMirror.defineMode('wcms-markdown', (config, parserConfig) => { |