Browse Source

mcedit: syntax.syntax: highlight comments preceded by spaces.

Comments don't have to start at the 1st column. We add support for this case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Mooffie 8 years ago
parent
commit
2e078ff774
1 changed files with 6 additions and 0 deletions
  1. 6 0
      misc/syntax/syntax.syntax

+ 6 - 0
misc/syntax/syntax.syntax

@@ -52,3 +52,9 @@ context default
     keyword whole white white
 
 context linestart # \n brown
+    spellcheck
+
+# Ideally we would have defined comments with "context linestart \[\s\]# ...",
+# but contexts can't start with a character class. So we define comments twice.
+context linestart \s\[\s\]# \n brown
+    spellcheck