remove commas in tohighlight list

master
Joey Hess 2009-05-23 00:09:14 -04:00
parent 21d6aded47
commit cdd1b58b38
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ sub getsetup () {
}, },
tohighlight => { tohighlight => {
type => "string", type => "string",
example => ".c, .h, .cpp, .pl, .py, Makefile:make", example => ".c .h .cpp .pl .py Makefile:make",
description => "source files to syntax highlight", description => "source files to syntax highlight",
safe => 1, safe => 1,
rebuild => 1, rebuild => 1,
@ -32,7 +32,7 @@ sub getsetup () {
sub checkconfig () { sub checkconfig () {
if (exists $config{tohighlight}) { if (exists $config{tohighlight}) {
foreach my $file (split /, /, $config{tohighlight}) { foreach my $file (split ' ', $config{tohighlight}) {
my @opts = $file=~s/^\.// ? my @opts = $file=~s/^\.// ?
(keepextension => 1) : (keepextension => 1) :
(noextension => 1); (noextension => 1);

View File

@ -19,7 +19,7 @@ setup file to control which files should be syntax highlighted.
Here is a typical setting for it, enabling highlighting for files Here is a typical setting for it, enabling highlighting for files
with the extensions .c, etc, and also for any files named "Makefile". with the extensions .c, etc, and also for any files named "Makefile".
tohighlight => .c, .h, .cpp, .pl, .py, Makefile:make", tohighlight => ".c .h .cpp .pl .py Makefile:make",
It knows what language to use for most filename extensions (see It knows what language to use for most filename extensions (see
`/etc/highlight/filetypes.conf` for a partial list), but if you want to `/etc/highlight/filetypes.conf` for a partial list), but if you want to