X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=doclib%2Ffilter.pl;h=14ad930e46bdcc6555d72fbdb84cef6dc855caa7;hb=259da4c692259311c6ec99566b57f5ed1e68e93e;hp=eb9214db98fdf9cbbadf517b75aa4114fcc98157;hpb=553781d9e9bce316dca24ac4f0c42e5613e849e0;p=senf.git diff --git a/doclib/filter.pl b/doclib/filter.pl index eb9214d..14ad930 100755 --- a/doclib/filter.pl +++ b/doclib/filter.pl @@ -1,11 +1,21 @@ #!/usr/bin/perl -n +BEGIN { + ($topdir=$0) =~ s{doclib/.*$}{}; + print $topdir,"\n"; +} + s/\s*$//; while (s/\t/' 'x(8-length($`)%8)/e) {} if (/^\s*\\code$/ .. /\\endcode/ && !/^$/) { $i=length($1) if /^(\s*)\\code$/; print substr($_,$i),"\n"; -} else { +} +elsif (s/^(\s*)
$/$1/ .. /<\/pre>/ && !/^$/) { + $i=length($1) if /^(\s*)$/; + print substr($_,$i),"\n"; +} +else { print $_,"\n"; }