From: Jari Aalto (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-2051-
1173043999-1740.41698-75-0@perl.org>
plus test adjustments
p4raw-id: //depot/perl@30583
# still generate an index, but surround it with an html comment.
# that way some other program can extract it if desired.
$index =~ s/--+/-/g;
- print HTML "<p><a name=\"__index__\"></a></p>\n";
- print HTML "<!-- INDEX BEGIN -->\n";
- print HTML "<!--\n" unless $Doindex;
- print HTML $index;
- print HTML "-->\n" unless $Doindex;
- print HTML "<!-- INDEX END -->\n\n";
- print HTML "<hr />\n" if $Doindex and $index;
+
+ my $hr = ($Doindex and $index) ? qq(<hr name="index" />) : "";
+
+ unless ($Doindex)
+ {
+ $index = qq(<!--\n$index\n-->\n);
+ }
+
+ print HTML << "END_OF_INDEX";
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name=\"__index__\"></a></p>
+$index
+$hr
+</div>
+<!-- INDEX END -->
+
+END_OF_INDEX
# now convert this file
my $after_item; # set to true after an =item
<body style="background-color: white">
-<p><a name="__index__"></a></p>
+
<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#description">DESCRIPTION</a></li>
</ul>
+
+<hr name="index" />
+</div>
<!-- INDEX END -->
-<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<body style="background-color: white">
-<p><a name="__index__"></a></p>
+
<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
<ul>
</ul>
</ul>
+
+<hr name="index" />
+</div>
<!-- INDEX END -->
-<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<body style="background-color: white">
-<p><a name="__index__"></a></p>
+
<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
<ul>
<li><a href="#testing_urls_hyperlinking">TESTING URLs hyperlinking</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
</ul>
+
+<hr name="index" />
+</div>
<!-- INDEX END -->
-<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>