From b9f472a905d6114d8460f42fe02994745e90e52f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 17 Oct 2021 12:19:28 +0200 Subject: [PATCH] syntax: texinfo: be more precise in colorizing @commands An @command must either start at the beginning of the line and be followed by whitespace or EOL, or it must be followed by a brace. Colorizing just any "@text" string colored too much. --- syntax/texinfo.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/texinfo.nanorc b/syntax/texinfo.nanorc index 39cb20f9..33a1738e 100644 --- a/syntax/texinfo.nanorc +++ b/syntax/texinfo.nanorc @@ -15,7 +15,7 @@ color purple start="^@direntry" end="^@end direntry" color cyan "^@[a-z]+[[:space:]]+.*" color lightmagenta "@([a-z]+|,|H|U)\{([^}]|@\}|@[a-z]+\{[^}]*\})*\}" # Commands themselves. -color yellow "@([a-z]+\{?|[,HU]\{|(AA|AE|DH|L|OE?|(La)?TeX|TH)\{)|\}" +color yellow "^@[a-z]+([[:space:]]|$)|@([a-z]+|,|H|U|AA|AE|DH|L|OE?|(La)?TeX|TH)\{|\}" color pink "@[!"'&*./:=?@\^`{}~-]" # Special separator for headings and footings.