3 # pod2html creates complete pages, but we want embeddable ones.
4 # Fortunately, it's easy to find the stuff that need to go away.
6 local $/; # Slurp the whole file
7 my $contents = <STDIN>;
9 $contents =~ m@^<h1 id="NAME">NAME</h1>@m;
10 $contents = $&.$'; # Everything before NAME is stripped
11 $contents =~ m@^</body>@m;
12 $contents = $`; # </body> and everything after is stripped
14 # Adapt all H tags to be wrapped inside H1 and H2
15 $contents =~ s@(</?h)(\d)(\s|>)@$1.($2 + 2).$3@emg;