X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/ff97b0358bfeffdca5af9b884ae831599bf43403..f92a5ddbbbee7c220b780cae1c45fcfec107967c:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index cdbcd2481..80750f502 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -680,7 +680,7 @@ sub preprocess ($$$;$$) { #{{{ # consider it significant. my @params; while ($params =~ m{ - (?:(\w+)=)? # 1: named parameter key? + (?:([-\w]+)=)? # 1: named parameter key? (?: """(.*?)""" # 2: triple-quoted value | @@ -740,11 +740,11 @@ sub preprocess ($$$;$$) { #{{{ $content =~ s{ (\\?) # 1: escape? \[\[ # directive open - (\w+) # 2: command + ([-\w]+) # 2: command \s+ ( # 3: the parameters.. (?: - (?:\w+=)? # named parameter key? + (?:[-\w]+=)? # named parameter key? (?: """.*?""" # triple-quoted value | @@ -1067,10 +1067,10 @@ sub file_pruned ($$) { #{{{ require File::Spec; my $file=File::Spec->canonpath(shift); my $base=File::Spec->canonpath(shift); - $file =~ s#^\Q$base\E/*##; + $file =~ s#^\Q$base\E/+##; my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; - return $file =~ m/$regexp/; + return $file =~ m/$regexp/ && $file ne $base; } #}}} sub gettext { #{{{