Package: nano
Version: 2.2.4-1
Severity: minor

A CD name containing / or : won't match the regex "[-a-zA-Z0-9\._\(\) ]+" since
this characters are missing. As a comment line in this file complains, the
regex "[^\]]" won't work but that is because the escaping character \ doesn't
work inside character classes. Instead, the simple regex "[^]]+" will match any
cdrom name.
This 3 lines trying to match cdrom names should be changed:

# component
color   magenta
"^deb(-src)?\s+((http|file|ftp):/\S+|cdrom:\[[^]]+\]/)\s+\S+\s+.+$"
# distribution
color   red     "^deb(-src)?\s+((http|file|ftp):/\S+|cdrom:\[[^]]+\]/)\s+\S+"
# cdroms
color   green   "^deb\s+cdrom:\[[^]]+\]/"

Moreover, URI regex should also start with "^deb(-src)?\s+"... otherwise it
will highlight any URI in any position.

Thanks.
Dani



-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.utf8, LC_CTYPE=ca_ES.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nano depends on:
ii  dpkg                      1.15.8.12      Debian package management system
ii  install-info              4.13a.dfsg.1-6 Manage installed documentation in 
ii  libc6                     2.11.3-3       Embedded GNU C Library: Shared lib
ii  libncursesw5              5.7+20100313-5 shared libraries for terminal hand

nano recommends no packages.

Versions of packages nano suggests:
pn  spell                         <none>     (no description available)

-- no debconf information
## Here is an exmaple for apt's sources.list
## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano
## (m...@milianw.de).
##
syntax "apt/sources.list" "sources\.list(\.old|~)?$"
# component
color   magenta 
"^deb(-src)?\s+((http|file|ftp):/\S+|cdrom:\[[^]]+\]/)\s+\S+\s+.+$"
# distribution
color   red     "^deb(-src)?\s+((http|file|ftp):/\S+|cdrom:\[[^]]+\]/)\s+\S+"
# URI
color   green   "^deb(-src)?\s+(http|file|ftp):/\S+"
# cdroms
color   green   "^deb\s+cdrom:\[[^]]+\]/"
# deb / deb-src
color   yellow  "^deb(-src)?"
# comments
color   blue    "#.*"

Reply via email to