diff options
Diffstat (limited to 'src/edit.js')
-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) => { |