[Python-checkins] python/dist/src/Doc/perl python.perl, 1.137.8.1,
1.137.8.2
fdrake at users.sourceforge.net
fdrake at users.sourceforge.net
Wed Mar 31 23:33:42 EST 2004
Update of /cvsroot/python/python/dist/src/Doc/perl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17255
Modified Files:
Tag: release23-maint
python.perl
Log Message:
backport trunk revision 1.144, closing SF bug #793702:
- make "--" in code text not get converted to "-"
- fix minor typo in comment
(but this time the typo is fixed correctly!)
Index: python.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.137.8.1
retrieving revision 1.137.8.2
diff -C2 -d -r1.137.8.1 -r1.137.8.2
*** python.perl 8 Jan 2004 15:00:13 -0000 1.137.8.1
--- python.perl 1 Apr 2004 04:33:39 -0000 1.137.8.2
***************
*** 156,159 ****
--- 156,167 ----
}
+ # Helper used in many places that arbitrary code-like text appears:
+
+ sub codetext($){
+ my $text = "$_[0]";
+ $text =~ s/--/-\-/go;
+ return $text;
+ }
+
sub use_wrappers($$$){
local($_,$before,$after) = @_;
***************
*** 162,165 ****
--- 170,179 ----
}
+ sub use_code_wrappers($$$){
+ local($_,$before,$after) = @_;
+ my $stuff = codetext(next_argument());
+ return $before . $stuff . $after . $_;
+ }
+
$IN_DESC_HANDLER = 0;
sub do_cmd_optional{
***************
*** 182,186 ****
return use_wrappers($_[0], '<span class="makevar">', '</span>'); }
sub do_cmd_code{
! return use_wrappers($_[0], '<code>', '</code>'); }
sub do_cmd_module{
return use_wrappers($_[0], '<tt class="module">', '</tt>'); }
--- 196,200 ----
return use_wrappers($_[0], '<span class="makevar">', '</span>'); }
sub do_cmd_code{
! return use_code_wrappers($_[0], '<code>', '</code>'); }
sub do_cmd_module{
return use_wrappers($_[0], '<tt class="module">', '</tt>'); }
***************
*** 206,212 ****
return use_wrappers($_[0], '<tt class="ctype">', '</tt>'); }
sub do_cmd_regexp{
! return use_wrappers($_[0], '<tt class="regexp">', '</tt>'); }
sub do_cmd_character{
! return use_wrappers($_[0], '"<tt class="character">', '</tt>"'); }
sub do_cmd_program{
return use_wrappers($_[0], '<b class="program">', '</b>'); }
--- 220,226 ----
return use_wrappers($_[0], '<tt class="ctype">', '</tt>'); }
sub do_cmd_regexp{
! return use_code_wrappers($_[0], '<tt class="regexp">', '</tt>'); }
sub do_cmd_character{
! return use_code_wrappers($_[0], '"<tt class="character">', '</tt>"'); }
sub do_cmd_program{
return use_wrappers($_[0], '<b class="program">', '</b>'); }
***************
*** 233,237 ****
return do_cmd_file($_[0]); }
sub do_cmd_samp{
! return use_wrappers($_[0], '"<tt class="samp">', '</tt>"'); }
sub do_cmd_kbd{
return use_wrappers($_[0], '<kbd>', '</kbd>'); }
--- 247,251 ----
return do_cmd_file($_[0]); }
sub do_cmd_samp{
! return use_code_wrappers($_[0], '"<tt class="samp">', '</tt>"'); }
sub do_cmd_kbd{
return use_wrappers($_[0], '<kbd>', '</kbd>'); }
***************
*** 612,616 ****
define_indexing_macro('ttindex');
sub idx_cmd_ttindex($){
! my $str = next_argument();
my $entry = $str . get_indexsubitem();
add_index_entry($entry, $_[0]);
--- 626,630 ----
define_indexing_macro('ttindex');
sub idx_cmd_ttindex($){
! my $str = codetext(next_argument());
my $entry = $str . get_indexsubitem();
add_index_entry($entry, $_[0]);
***************
*** 2028,2035 ****
};
$open_tags_R = [ @keep_open_tags ];
! $_;
}
! # List of all filenames produced ny do_cmd_verbatiminput()
%VerbatimFiles = ();
@VerbatimOutputs = ();
--- 2042,2049 ----
};
$open_tags_R = [ @keep_open_tags ];
! return codetext($_);
}
! # List of all filenames produced by do_cmd_verbatiminput()
%VerbatimFiles = ();
@VerbatimOutputs = ();
More information about the Python-checkins
mailing list