summaryrefslogtreecommitdiffstats
path: root/Doc/perl/python.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-02-09 15:31:52 (GMT)
committerFred Drake <fdrake@acm.org>1999-02-09 15:31:52 (GMT)
commit1a4c5392b5a721a155fe939c4e42e48fb5db9d79 (patch)
tree87d447e219142f55857d94e4cb4c3edcbd369b65 /Doc/perl/python.perl
parentd1f66dc198a003b182e846ff65b04af8cc94e3b7 (diff)
downloadcpython-1a4c5392b5a721a155fe939c4e42e48fb5db9d79.zip
cpython-1a4c5392b5a721a155fe939c4e42e48fb5db9d79.tar.gz
cpython-1a4c5392b5a721a155fe939c4e42e48fb5db9d79.tar.bz2
Back out some of the fine tuning; something in all that interacted
badly in practice and botched the whole thing. Wasn't obvious when looking at the local effects (which worked), but completely broke entire pages. ;-(
Diffstat (limited to 'Doc/perl/python.perl')
-rw-r--r--Doc/perl/python.perl22
1 files changed, 3 insertions, 19 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 020f31e..883bd3e 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -101,14 +101,6 @@ sub use_wrappers{
return $before . $stuff . $after . $_;
}
-sub use_env_wrappers{
- local($_,$before,$after,$tag) = @_;
- push(@open_tags,$tag);
- my $s = join('', $before,
- translate_commands(next_argument()), $after, $_);
- return $s;
-}
-
sub use_sans_serif{
return use_wrappers(@_[0], '<font face="sans-serif">', '</font>');
}
@@ -128,7 +120,7 @@ sub do_cmd_optional{
sub do_cmd_pytype{ return @_[0]; }
sub do_cmd_makevar{ return @_[0]; }
-sub do_cmd_code{ return use_env_wrappers(@_[0], '<tt>', '</tt>', 'tt'); }
+sub do_cmd_code{ return use_wrappers(@_[0], '<tt>', '</tt>'); }
sub do_cmd_module{ return do_cmd_code(@_); }
sub do_cmd_keyword{ return do_cmd_code(@_); }
sub do_cmd_exception{ return do_cmd_code(@_); }
@@ -145,19 +137,11 @@ sub do_cmd_character{ return do_cmd_samp(@_); }
sub do_cmd_program{ return do_cmd_strong(@_); }
sub do_cmd_email{ return use_sans_serif(@_); }
sub do_cmd_mimetype{ return use_sans_serif(@_); }
-sub do_cmd_var{
- local($_, *open_args) = @_;
- my $prevtag = $open_args[(scalar @open_args) - 1];
- if ($prevtag eq "code" || $prevtag eq "tt") {
- # in code of some sort....
- my $text = next_argument();
- return "</$prevtag><i>$text</i><$prevtag>$_";
- }
- return use_italics(@_); }
+sub do_cmd_var{ return use_wrappers(@_[0], "<i>", "</i>"); }
sub do_cmd_dfn{ return use_italics(@_); } # make an index entry?
sub do_cmd_emph{ return use_italics(@_); }
sub do_cmd_file{ return use_wrappers(@_[0], '"<tt>', '</tt>"'); }
-sub do_cmd_samp{ return use_env_wrappers(@_[0], '"<tt>', '</tt>"', 'tt'); }
+sub do_cmd_samp{ return use_wrappers(@_[0], '"<tt>', '</tt>"'); }
sub do_cmd_kbd{ return use_wrappers(@_[0], '<kbd>', '</kbd>'); }
sub do_cmd_strong{ return use_wrappers(@_[0], '<b>', '</b>'); }