~woffs/wcm

caab6b9f465b0b6644f8cdcad157f33c6ca6b4dd — Frank Doepper 10 years ago 05df1f1 20130322
fix multiple _ in filename
1 files changed, 2 insertions(+), 2 deletions(-)

M index.pl
M index.pl => index.pl +2 -2
@@ 4,7 4,7 @@
# http://woffs.de/WCM
# <wcm@woffs.de>
#
# Version 20121129
# Version 20130322
# 
# Copyright © 2010-2012 WofFS
#


@@ 63,7 63,7 @@ sub walktree ($$$) {
    $title=~s/^[^_]*_//;                   # strip until first _ for sorting
    my $hidden=($&=~/^0/);                 # 00_ 01_ etc. means hidden
    (my $href="$dir/$title")=~s,^$src/,,;  # strip subdir name
    $href=~s/(^|\/)[^_]*_/$1/g;            # strip until first _ in all path components
    $href=~s/(^|\/)[^_]*_(?=.*\/)/$1/g;    # strip until first _ in all path components
    $href=~s/[ ?'"&;]/_/g;                 # replace special chars in links
    my $selected='';                       # highlight selected link
    (my $bhref=$href)=~s,.*/,,;