commit b9f472a905d6114d8460f42fe02994745e90e52f
parent 557d8131ca02d2aea5438c9ee758b208549f6348
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 17 Oct 2021 12:19:28 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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.