commit 020c5cbb6745ff203327b198e17b45b62e20a883 from: Russ Cox date: Thu Jul 03 22:50:23 2008 UTC dist: new, linear addsrclinks commit - 806c4c953cd9eeb4358202bd0daa273342d5bdc9 commit + 020c5cbb6745ff203327b198e17b45b62e20a883 blob - edaa3d42dd81e2d5a7896358e46ebab9e9361bf3 blob + ef73be70474515d65e823ed2c5ff6381dc1cfd09 --- dist/addsrclinks +++ dist/addsrclinks @@ -4,8 +4,9 @@ my $root = $ENV{'PLAN9'}; my $html = join("", @_); $html =~ s;$root/;XXX$root/;g; -while($html =~ /((.|\n)*)XXX($root\/([a-zA-Z0-9_.\/]|−)*[a-zA-Z0-9_\/])((.|\n)*)/){ - ($a, $b, $c) = ($1, $3, $5); +$newhtml = ""; +while($html =~ /XXX($root\/([a-zA-Z0-9_.\/]|−)*[a-zA-Z0-9_\/])/){ + ($a, $b, $c) = ($`, $1, $'); $b =~ s/−/-/g; $l = $b; while(! -e $l){ @@ -19,6 +20,8 @@ while($html =~ /((.|\n)*)XXX($root\/([a-zA-Z0-9_.\/]|& $b = $l; $b =~ s/-/\−/g; $bb =~ s/-/\−/g; - $html = "$a$b$bb$c"; + $newhtml .= "$a$b$bb"; + $html = $c; } -print $html; +$newhtml .= $html; +print $newhtml;