tag 423168 + patch
thanks
This particular issue can be resolved using one of the attached alternative
patches. The effect of the patches is identical, it is just the
implementation that is slightly different. Pick whichever you prefer.
Note that there are other issues with the generation of (nested) definition
lists which I will address in a separate bug report.
Cheers,
FJP
--- perl-5.8.8/lib/Html.pm.orig 2006-12-05 12:52:37.0 +0100
+++ perl-5.8.8/lib/Html.pm 2007-09-05 18:29:42.0 +0200
@@ -1120,7 +1120,7 @@
$name = anchorify($name);
print HTML qq{a name=$name}, process_text( \$otext ), '/a';
}
-print HTML /strong\n;
+print HTML /strong;
undef( $EmittedItem );
}
@@ -1168,6 +1168,7 @@
my $tag = $1;
$otext =~ s/\A\*\s+//;
emit_item_tag( $otext, $tag, 1 );
+print HTML \n;
}
} elsif( $text =~ /\A\d+/ ){ # numbered list
@@ -1176,12 +1177,14 @@
my $tag = $1;
$otext =~ s/\A\d+\.?\s*//;
emit_item_tag( $otext, $tag, 1 );
+print HTML \n;
}
} else { # definition list
$emitted = emit_li( 'dl' );
if ($text =~ /\A(.+)\Z/s ){ # should have text
emit_item_tag( $otext, $text, 1 );
+print HTML /dt\n;
}
$need_dd = 1;
}
--- perl-5.8.8/lib/Html.pm.orig 2006-12-05 12:52:37.0 +0100
+++ perl-5.8.8/lib/Html.pm 2007-09-05 18:22:42.0 +0200
@@ -1105,8 +1105,8 @@
#
my $EmittedItem;
-sub emit_item_tag($$$){
-my( $otext, $text, $compact ) = @_;
+sub emit_item_tag(){
+my( $otext, $text, $compact, $closetag ) = @_;
my $item = fragment_id( $text );
$EmittedItem = $item;
@@ -1120,7 +1120,11 @@
$name = anchorify($name);
print HTML qq{a name=$name}, process_text( \$otext ), '/a';
}
-print HTML /strong\n;
+if ($closetag) {
+print HTML /strong/$closetag\n;
+} else {
+print HTML /strong\n;
+}
undef( $EmittedItem );
}
@@ -1167,7 +1171,7 @@
if ($text =~ /\A\*\s+(.+)\Z/s ) { # with additional text
my $tag = $1;
$otext =~ s/\A\*\s+//;
-emit_item_tag( $otext, $tag, 1 );
+emit_item_tag( $otext, $tag, 1, );
}
} elsif( $text =~ /\A\d+/ ){ # numbered list
@@ -1175,13 +1179,13 @@
if ($text =~ /\A(?\d+\.?)\s*(.+)\Z/s ) { # with additional text
my $tag = $1;
$otext =~ s/\A\d+\.?\s*//;
-emit_item_tag( $otext, $tag, 1 );
+emit_item_tag( $otext, $tag, 1, );
}
} else { # definition list
$emitted = emit_li( 'dl' );
if ($text =~ /\A(.+)\Z/s ){ # should have text
-emit_item_tag( $otext, $text, 1 );
+emit_item_tag( $otext, $text, 1, $emitted );
}
$need_dd = 1;
}
signature.asc
Description: This is a digitally signed message part.