Commit 2da9cbf1 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Using character classes correctly.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 4 additions and 3 deletions
+4 -3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* src/browser.c (browser_refresh): Display an ellipsis only when the * src/browser.c (browser_refresh): Display an ellipsis only when the
filename is longer than the available space, not when it still fits. filename is longer than the available space, not when it still fits.
* src/browser.c, src/nano.c: Adjust a few comments and line wrappings. * src/browser.c, src/nano.c: Adjust a few comments and line wrappings.
* doc/syntax/groff.nanorc: Use character classes correctly.
2015-04-28 Benno Schulenberg <bensberg@justemail.net> 2015-04-28 Benno Schulenberg <bensberg@justemail.net>
* src/color.c (color_update): Match the file regex of a syntax against * src/color.c (color_update): Match the file regex of a syntax against
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac." syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
# The argument of .ds or .nr # The argument of .ds or .nr
color cyan "^\.(ds|nr) [^[[:space:]]]*" color cyan "^\.(ds|nr) [^[:space:]]*"
# Single-character escapes # Single-character escapes
color brightmagenta "\\." color brightmagenta "\\."
# The argument of \f or \s in the same color # The argument of \f or \s in the same color
...@@ -12,7 +12,7 @@ color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]" ...@@ -12,7 +12,7 @@ color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
color cyan "(\\|\\\\)n(.|\(..)" color cyan "(\\|\\\\)n(.|\(..)"
color cyan start="(\\|\\\\)n\[" end="]" color cyan start="(\\|\\\\)n\[" end="]"
# Requests # Requests
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" color brightgreen "^\.[[:space:]]*[^[:space:]]*"
# Comments # Comments
color yellow "^\.\\".*$" color yellow "^\.\\".*$"
# Strings # Strings
......
...@@ -25,7 +25,7 @@ color brightyellow "<[^= ]*>" ""(\.|[^"])*"" ...@@ -25,7 +25,7 @@ color brightyellow "<[^= ]*>" ""(\.|[^"])*""
color brightblue "//.*" color brightblue "//.*"
color brightblue start="/\*" end="\*/" color brightblue start="/\*" end="\*/"
##color blue start="<" end=">" ##color blue start="<" end=">"
##color red "&[^;[[:space:]]]*;" ##color red "&[^;[:space:]]*;"
# Trailing whitespace. # Trailing whitespace.
color ,green "[[:space:]]+$" color ,green "[[:space:]]+$"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment