mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
544351f3be
In many places a carriage return is not valid whitespace and should thus not be colored as such. In some of these places a vertical tab or form feed is maybe valid whitespace, but it would be ugly or even wrong to color them because they are not part of the subsequent comment or keyword. This fixes https://savannah.gnu.org/bugs/?60456.
24 lines
546 B
Plaintext
24 lines
546 B
Plaintext
## This is an example of a default syntax. The default syntax is used for
|
|
## files that do not match any other syntax.
|
|
|
|
syntax default
|
|
comment "#"
|
|
|
|
# Comments.
|
|
color cyan "^[[:blank:]]*#.*"
|
|
|
|
# Spaces in front of tabs.
|
|
color ,red " + +"
|
|
|
|
# Nano's name, including version.
|
|
color brightred "(GNU )?[Nn]ano [1-5]\.[0-9][-.[:alnum:]]*\>"
|
|
|
|
# Email addresses.
|
|
color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>"
|
|
|
|
# Bracketed captions in certain config files.
|
|
color brightgreen "^\[[^][]+\]$"
|
|
|
|
# Control codes.
|
|
color latte "[[:cntrl:]]"
|