Ticket #3693: 3693-mcedit-syntax.syntax-highlight-comments-preceded-by-spaces.patch

File 3693-mcedit-syntax.syntax-highlight-comments-preceded-by-spaces.patch, 878 bytes (added by mooffie, 6 years ago)
  • misc/syntax/syntax.syntax

    From 814e1ffe9c7e0878101f9d16b740983e510d43f3 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Mon, 5 Dec 2016 01:48:33 +0200
    Subject: [PATCH] mcedit: syntax.syntax: highlight comments preceded by spaces.
    
    Comments don't have to start at the 1st column. We add support for this case.
    ---
     misc/syntax/syntax.syntax | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/misc/syntax/syntax.syntax b/misc/syntax/syntax.syntax
    index d7ed50d..fd6d132 100644
    a b context default 
    5252    keyword whole white white 
    5353 
    5454context linestart # \n brown 
     55    spellcheck 
     56 
     57# Ideally we would have defined comments with "context linestart \[\s\]# ...", 
     58# but contexts can't start with a character class. So we define comments twice. 
     59context linestart \s\[\s\]# \n brown 
     60    spellcheck