[Python-checkins] python/dist/src/Doc/perl python.perl,1.143,1.144

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Tue Dec 30 11:19:31 EST 2003


Update of /cvsroot/python/python/dist/src/Doc/perl
In directory sc8-pr-cvs1:/tmp/cvs-serv28616
Modified Files:
	python.perl 
Log Message:
- make "--" in code text not get converted to "-"
- fix minor typo in comment
Index: python.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** python.perl	26 Nov 2003 20:55:49 -0000	1.143
--- python.perl	30 Dec 2003 16:19:28 -0000	1.144
***************
*** 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>'); }
***************
*** 618,622 ****
 define_indexing_macro('ttindex');
 sub idx_cmd_ttindex($){
! my $str = next_argument();
 my $entry = $str . get_indexsubitem();
 add_index_entry($entry, $_[0]);
--- 632,636 ----
 define_indexing_macro('ttindex');
 sub idx_cmd_ttindex($){
! my $str = codetext(next_argument());
 my $entry = $str . get_indexsubitem();
 add_index_entry($entry, $_[0]);
***************
*** 2050,2057 ****
 };
 $open_tags_R = [ @keep_open_tags ];
! $_;
 }
 
! # List of all filenames produced ny do_cmd_verbatiminput()
 %VerbatimFiles = ();
 @VerbatimOutputs = ();
--- 2064,2071 ----
 };
 $open_tags_R = [ @keep_open_tags ];
! return codetext($_);
 }
 
! # List of all filenames produced my do_cmd_verbatiminput()
 %VerbatimFiles = ();
 @VerbatimOutputs = ();


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /