commit e473ba5e6cae947f9e08af5462c987fc4a8fd826
parent 9120a62cdd278156d7eda28468ebfa58b0efc682
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 30 Mar 2019 20:48:42 +0100
syntax: man: anchor macros at start of line, as only then they are valid
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/syntax/man.nanorc b/syntax/man.nanorc
@@ -5,19 +5,19 @@ magic "troff or preprocessor input"
comment ".\""
# Section headers, title line, and indented paragraphs.
-color green "\.(SH|SS|TH) .*"
-color brightgreen "\.(SH|SS|TH) " "\.([HIT]P)"
+color green "^\.(SH|SS|TH) .*"
+color brightgreen "^\.(SH|SS|TH) " "^\.([HIT]P)"
# Type faces, and normal paragraphs.
-color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*"
-color brightblue "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "\.([LP]?P)$"
+color brightred "^\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*"
+color brightblue "^\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "^\.([LP]?P)$"
# Inline type faces.
color magenta "\\f[BIPR]"
# Relative margins, hyperlinks, and various other stuff.
-color yellow "\.(RS|RE|UR|UE|PD|DT)"
-color yellow "\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|hy|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)"
+color yellow "^\.(RS|RE|UR|UE|PD|DT)"
+color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|hy|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)"
# Comments.
-color cyan "\.?\\\".*"
+color cyan "^\.?\\\".*"
# Trailing whitespace.
color ,green "[[:space:]]+$"