my $type=pagetype($file);
my $page=$file;
- $page=~s/\Q.$type\E*$// if defined $type;
+ $page=~s/\Q.$type\E*$// if defined $type && !$hooks{htmlize}{$type}{leavesuffix};
return $page;
my $type=pagetype($file);
my $page=$file;
- $page=~s/\Q.$type\E*$// if defined $type;
+ $page=~s/\Q.$type\E*$// if defined $type && !$hooks{htmlize}{$type}{leavesuffix};
return $page;