Utils: Add some type traits in type_traits.hh
[senf.git] / doclib / filter.pl
1 #!/usr/bin/perl -n
2
3 BEGIN {
4     ($topdir=$0) =~ s{doclib/.*$}{};
5     print $topdir,"\n";
6 }
7
8 s/\s*$//;
9 while (s/\t/' 'x(8-length($`)%8)/e) {}
10
11 if (/^\s*\\code$/ .. /\\endcode/ && !/^$/) {
12     $i=length($1) if /^(\s*)\\code$/;
13     print substr($_,$i),"\n";
14
15 elsif (s/^(\s*)<pre>$/$1<pre class="fragment">/ .. /<\/pre>/ && !/^$/) {
16     $i=length($1) if /^(\s*)<pre class="fragment">$/;
17     print substr($_,$i),"\n";
18
19 else {
20     print $_,"\n";
21 }