Files
nano-with-linefolding/syntax/texinfo.nanorc
Benno Schulenberg 2181853574 syntaxes: use character classes instead of range expressions
In some locales certain normal ASCII characters are not included in
the ranges [A-Z] and [a-z].  So, use [[:upper:]] and [[:lower:]]
instead, and [[:alpha:]] for [A-Za-z], and similarly for others.

This fixes https://savannah.gnu.org/bugs/?67094.
2025-05-08 10:24:49 +02:00

32 lines
864 B
Plaintext

## Syntax highlighting for Texinfo files.
## Original author: Benno Schulenberg
## License: GPL version 3 or newer
syntax texinfo "\.texi$"
header "^\\input texinfo"
magic "Texinfo source"
comment "@c "
# How the manual gets listed in the directory node.
color purple start="^@direntry" end="^@end direntry"
# Command arguments, trailing and enclosed.
color cyan "^@[[:lower:]]+[[:space:]]+.*"
color lightmagenta "@([[:lower:]]+|,|H|U)\{([^}]|@\}|@[[:lower:]]+\{[^}]*\})*\}"
# Commands themselves.
color yellow "^@[[:lower:]]+([[:space:]]|$)|@([[:lower:]]+|,|H|U|AA|AE|DH|L|OE?|(La)?TeX|TH)\{|\}"
color pink "@[!"'&*./:=?@\^`{}~-]"
# Special separator for headings and footings.
color mint "@\|"
# Menu items.
color brightred "^\*[[:space:]]+.*::.*"
# Comments.
color green "@c(omment)?[[:space:]]+.*"
# Trailing whitespace.
color ,green "[[:space:]]+$"