commit 636e9ac3e8786762a9e43008275ed9c70c1a25b8
parent af71d44e4ee6ab1ee23eaef796234714b3f6ab2c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 3 Nov 2018 21:12:44 +0100
syntaxes: remove several redundant end-of-line anchors from regexes
Diffstat:
17 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/syntax/changelog.nanorc b/syntax/changelog.nanorc
@@ -3,7 +3,7 @@
syntax changelog "Change[Ll]og[^/]*$"
# Author lines.
-color green "^(19|20).*$"
+color green "^(19|20).*"
# Dates.
color red "^(19|20)[0-9-]{8}"
# Email addresses.
diff --git a/syntax/elisp.nanorc b/syntax/elisp.nanorc
@@ -30,4 +30,4 @@ color blue ":(\w|[?-])+"
color yellow start="^[[:blank:]]+\"" end="[^\]\""
color yellow ""(\\.|[^"])*""
# Comments
-color cyan "(^|[[:space:]]);.*$"
+color cyan "(^|[[:space:]]);.*"
diff --git a/syntax/gentoo.nanorc b/syntax/gentoo.nanorc
@@ -39,7 +39,7 @@ color brightblue "\<tc-(arch(-kernel)?|export|has-(tls|openmp))\>"
## Common commands used in ebuilds:
color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
## Comments (doesn't work that well):
-color yellow "(^|[[:space:]])#.*$"
+color yellow "(^|[[:space:]])#.*"
## Strings (doesn't work that well):
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
## Trailing space is bad!
@@ -52,7 +52,7 @@ syntax /etc/portage "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$"
comment "#"
## Base text:
-color green "^.+$"
+color green ".+"
## Likely version and slot numbers:
color magenta "-[[:digit:].]+(_(alpha|beta|pre|rc|p)[[:digit:]]*)*(-r[[:digit:]]+)?([:[:space:]]|$)"
color magenta ":[^[:space:]]+([[:space:]]|$)"
@@ -67,7 +67,7 @@ color cyan "^[[:space:]]*[^/]*/"
## Masking regulators:
color brightmagenta "^[[:space:]]*(=|~|<|<=|>|>=)"
## Comments:
-color yellow "#.*$"
+color yellow "#.*"
## Trailing space is bad!
color ,green "[[:space:]]+$"
## Mixed whitespace is also bad.
diff --git a/syntax/groff.nanorc b/syntax/groff.nanorc
@@ -15,7 +15,7 @@ color cyan start="(\\|\\\\)n\[" end="]"
# Requests
color brightgreen "^\.[[:space:]]*[^[:space:]]*"
# Comments
-color yellow "^\.\\".*$"
+color yellow "^\.\\".*"
# Strings
color green "(\\|\\\\)\*(.|\(..)"
color green start="(\\|\\\\)\*\[" end="]"
diff --git a/syntax/guile.nanorc b/syntax/guile.nanorc
@@ -21,4 +21,4 @@ color blue "#?:(\w|[?-])+"
color yellow start="^[[:blank:]]+\"" end="[^\]\""
color yellow ""(\\.|[^"])*""
# Comments
-color cyan "(^|[[:space:]]);.*$"
+color cyan "(^|[[:space:]]);.*"
diff --git a/syntax/json.nanorc b/syntax/json.nanorc
@@ -28,7 +28,7 @@ color brightred "\{" "\}"
color brightred "," ":"
# Comments.
-color cyan "(^|[[:space:]]+)(//|#).*$"
+color cyan "(^|[[:space:]]+)(//|#).*"
# Trailing whitespace.
color ,green "[[:space:]]+$"
diff --git a/syntax/man.nanorc b/syntax/man.nanorc
@@ -4,15 +4,15 @@ syntax man "\.[1-9]x?$"
magic "troff or preprocessor input"
comment ".\""
-color green "\.(SH|SS|TH) .*$"
+color green "\.(SH|SS|TH) .*"
color brightgreen "\.(SH|SS|TH) " "\.([HIT]P)"
-color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*$"
+color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*"
color brightblue "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "\.([LP]?P)$"
color magenta "\\f[BIPR]"
color yellow "\.(br|DT|RS|RE|PD)"
# Comments.
-color cyan "\.?\\\".*$"
+color cyan "\.?\\\".*"
# Trailing whitespace.
color ,green "[[:space:]]+$"
diff --git a/syntax/mgp.nanorc b/syntax/mgp.nanorc
@@ -4,7 +4,7 @@ syntax mgp "\.mgp$"
header "^%include.*"
comment "#"
-icolor green "^%[a-z].*$"
-color cyan "(^|[[:space:]])#.*$"
-color cyan "(^|[[:space:]])%%.*$"
+icolor green "^%[a-z].*"
+color cyan "(^|[[:space:]])#.*"
+color cyan "(^|[[:space:]])%%.*"
color ,green "[[:space:]]+$"
diff --git a/syntax/nanorc.nanorc b/syntax/nanorc.nanorc
@@ -4,7 +4,7 @@ syntax nanorc "\.?nanorc$"
comment "#"
# Possible errors and parameters
-icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*$"
+icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*"
# Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|fill[[:space:]]+-?[[:digit:]]+|historylog|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|trimblanks|unix|view|wordbounds)\>"
@@ -12,7 +12,7 @@ icolor yellow "^[[:space:]]*set[[:space:]]+((error|function|key|number|selected|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+([[:alpha:]]+|".*")[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
-icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*$"
+icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*"
icolor brightgreen "^[[:space:]]*(syntax|linter)[[:space:]]+[^[:blank:]]+"
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|extendsyntax)\>"
@@ -24,8 +24,8 @@ icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|gr
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
# Comments
-color brightblue "(^|[[:space:]]+)#.*$"
-color cyan "^[[:space:]]*##.*$"
+color brightblue "(^|[[:space:]]+)#.*"
+color cyan "^[[:space:]]*##.*"
# Trailing whitespace
color ,green "[[:space:]]+$"
diff --git a/syntax/nftables.nanorc b/syntax/nftables.nanorc
@@ -17,7 +17,7 @@ color red "\<(drop|reject)\>"
color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>"
# Comments
-color cyan "(^|[[:space:]])#.*$"
+color cyan "(^|[[:space:]])#.*"
# Trailing whitespace
color ,green "[[:space:]]+$"
diff --git a/syntax/po.nanorc b/syntax/po.nanorc
@@ -26,4 +26,4 @@ color cyan "\\[abcefnrtv"\]"
# Reminders.
color brightwhite,yellow "(FIXME|TODO|XXX)"
# Obsolete strings.
-color red "#~.*$"
+color red "#~.*"
diff --git a/syntax/postgresql.nanorc b/syntax/postgresql.nanorc
@@ -59,9 +59,9 @@ color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>"
color green "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
# Comments.
-color red "#[^{].*$" "#$"
-color red "--[^{].*$" "#$"
-color red "##[^{].*$" "##$"
+color red "#[^{].*" "#$"
+color red "--[^{].*" "--$"
+color red "##[^{].*" "##$"
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
diff --git a/syntax/python.nanorc b/syntax/python.nanorc
@@ -26,7 +26,7 @@ color brightmagenta "\<(False|None|True)\>"
color brightgreen "'([^'\]|\\.)+'"
color brightgreen ""([^"\]|\\.)+""
# Comments.
-color brightred "(^|[[:blank:]])#.*$"
+color brightred "(^|[[:blank:]])#.*"
# Triple-quoted strings.
color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''"
color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(\])\"\"\""
diff --git a/syntax/ruby.nanorc b/syntax/ruby.nanorc
@@ -28,8 +28,8 @@ color brightgreen "#\{[^}]*\}"
# Strings, single-quoted.
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
# Comments.
-color cyan "#[^{].*$" "#$"
-color brightcyan "##[^{].*$" "##$"
+color cyan "#[^{].*" "#$"
+color brightcyan "##[^{].*" "##$"
# "Here" docs.
color green start="<<-?'?EOT'?" end="^EOT"
# Some common markers.
diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc
@@ -28,7 +28,7 @@ color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
# Comments.
-color cyan "(^|[[:space:]])#.*$"
+color cyan "(^|[[:space:]])#.*"
# Strings.
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
diff --git a/syntax/spec.nanorc b/syntax/spec.nanorc
@@ -31,7 +31,7 @@ color red "^%(post|posttrans|postun|trigger|triggerin|triggerpostun|triggerun|ve
color brightred "%(if|else|endif|define|global|undefine)"
# Comments.
-color cyan "#.*$"
+color cyan "#.*"
# Special case: "# norootforbuild" is handled as main tag.
color brightblue "^# norootforbuild"
# %changelog date entries.
diff --git a/syntax/texinfo.nanorc b/syntax/texinfo.nanorc
@@ -12,10 +12,10 @@ color brightmagenta "@[a-zA-Z]+\{[^}]*\}"
color yellow "@[a-zA-Z]+\{?" "\}"
# Menu items.
-color brightred "^\*[[:space:]]+.*::.*$"
+color brightred "^\*[[:space:]]+.*::.*"
# Comments.
-color green "@c[[:space:]]+.*$"
+color green "@c[[:space:]]+.*"
# Trailing whitespace.
color ,green "[[:space:]]+$"