summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-08-05 05:00:23 (GMT)
committerFred Drake <fdrake@acm.org>2003-08-05 05:00:23 (GMT)
commit5d9c636faffb9b7adec638fc48ac6a97a3a4b6b9 (patch)
tree9364cd977b0a60de917b88415ec7243ab600dad7 /Doc/perl
parent474335ce17c120eb74a17c5c4fd138694c535f77 (diff)
downloadcpython-5d9c636faffb9b7adec638fc48ac6a97a3a4b6b9.zip
cpython-5d9c636faffb9b7adec638fc48ac6a97a3a4b6b9.tar.gz
cpython-5d9c636faffb9b7adec638fc48ac6a97a3a4b6b9.tar.bz2
init_myformat(): None of the "mark" values can be empty strings, or
LaTeX2HTML feels free to remove a surrounding element that contains no other content. Since such an element is typically a named anchor used for hyperlinking, they should not be removed. Unfortunatley, making sure these marks are non-empty is the most direct way of avoiding this behavior. Thanks to Dave Kuhlman for tracking this down; this was some excellent detective work!
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/python.perl13
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 1f380cb..b7545b3 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -719,9 +719,16 @@ sub idx_cmd_refstmodindex($){
sub do_cmd_nodename{ return do_cmd_label($_[0]); }
sub init_myformat(){
- $anchor_invisible_mark = '&nbsp;';
- $anchor_invisible_mark2 = '';
- $anchor_mark = '';
+ # These markers must be non-empty or the main latex2html script
+ # may remove a surrounding element that has not other content as
+ # "extraneous"; this ensures these elements (usually hyperlink
+ # targets) are not removed improperly. We use comments since
+ # there's no meaningful actual content.
+ # Thanks to Dave Kuhlman for figuring why some named anchors were
+ # being lost.
+ $anchor_invisible_mark = '<!--x-->';
+ $anchor_invisible_mark2 = '<!--y-->';
+ $anchor_mark = '<!--z-->';
$icons{'anchor_mark'} = '';
}
init_myformat();