summaryrefslogtreecommitdiffstats
path: root/Doc/perl/l2hinit.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-04 17:03:54 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-04 17:03:54 (GMT)
commitbb7775a6aebb00d85a2ecd7c2d907c8abbf98446 (patch)
tree1dded002d8115a804af832e8e746666e64dfff94 /Doc/perl/l2hinit.perl
parent97e3201220175947fb7e21134dfa8fea4b91b4e7 (diff)
downloadcpython-bb7775a6aebb00d85a2ecd7c2d907c8abbf98446.zip
cpython-bb7775a6aebb00d85a2ecd7c2d907c8abbf98446.tar.gz
cpython-bb7775a6aebb00d85a2ecd7c2d907c8abbf98446.tar.bz2
Fix SF bug #479967: Appearantly I broke something that made the index
insertion work. This fix makes things at least somewhat more explicit, and adds a little sanity checking (and verbosity!) to add_bbl_and_idx_dummy_commands().
Diffstat (limited to 'Doc/perl/l2hinit.perl')
-rw-r--r--Doc/perl/l2hinit.perl12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 61c2ff1..19f0232 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -497,6 +497,7 @@ sub add_bbl_and_idx_dummy_commands {
if (scalar(@parts) == 3) {
# Be careful to re-write the string in place, since $_ is *not*
# returned explicity; *** nasty side-effect dependency! ***
+ print "\nadd_bbl_and_idx_dummy_commands ==> adding general index";
print "\nadd_bbl_and_idx_dummy_commands ==> adding module index";
my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex[\\s\\S]*)"
. "([\\\\]begin\\s*$O\\d+$C\\s*theindex)";
@@ -509,14 +510,21 @@ sub add_bbl_and_idx_dummy_commands {
$HAVE_GENERAL_INDEX = 1;
}
elsif (scalar(@parts) == 2) {
+ print "\nadd_bbl_and_idx_dummy_commands ==> adding general index";
+ my $rx = "([\\\\]begin\\s*$O\\d+$C\\s*theindex)";
+ s/$rx/\\textohtmlindex \1/o;
$HAVE_GENERAL_INDEX = 1;
}
- else {
+ elsif (scalar(@parts) == 1) {
+ print "\nadd_bbl_and_idx_dummy_commands ==> no index found";
$CUSTOM_BUTTONS .= get_my_icon('blank');
$global{'max_id'} = $id; # not sure why....
s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
s/[\\]printindex/\\textohtmlindex /o;
- }
+ }
+ else {
+ die "\n\nBad number of index environments!\n\n";
+ }
#----------------------------------------------------------------------
lib_add_bbl_and_idx_dummy_commands()
if defined(&lib_add_bbl_and_idx_dummy_commands);