Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
345555dd
Commit
345555dd
authored
Dec 30, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- make "--" in code text not get converted to "-"
- fix minor typo in comment
parent
4922cae1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
Doc/perl/python.perl
Doc/perl/python.perl
+21
-7
No files found.
Doc/perl/python.perl
View file @
345555dd
...
...
@@ -155,12 +155,26 @@ sub do_cmd_hackscore{
return
'
_
'
.
$_
;
}
# 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
)
=
@_
;
my
$stuff
=
next_argument
();
return
$before
.
$stuff
.
$after
.
$_
;
}
sub
use_code_wrappers
($$$){
local
(
$_
,
$before
,
$after
)
=
@_
;
my
$stuff
=
codetext
(
next_argument
());
return
$before
.
$stuff
.
$after
.
$_
;
}
$IN_DESC_HANDLER
=
0
;
sub
do_cmd_optional
{
if
(
$IN_DESC_HANDLER
)
{
...
...
@@ -181,7 +195,7 @@ sub do_cmd_pytype{ return $_[0]; }
sub
do_cmd_makevar
{
return
use_wrappers
(
$_
[
0
],
'
<span class="makevar">
',
'
</span>
');
}
sub
do_cmd_code
{
return
use_wrappers
(
$_
[
0
],
'
<code>
',
'
</code>
');
}
return
use_
code_
wrappers
(
$_
[
0
],
'
<code>
',
'
</code>
');
}
sub
do_cmd_module
{
return
use_wrappers
(
$_
[
0
],
'
<tt class="module">
',
'
</tt>
');
}
sub
do_cmd_keyword
{
...
...
@@ -205,9 +219,9 @@ sub do_cmd_cdata{
sub
do_cmd_ctype
{
return
use_wrappers
(
$_
[
0
],
'
<tt class="ctype">
',
'
</tt>
');
}
sub
do_cmd_regexp
{
return
use_wrappers
(
$_
[
0
],
'
<tt class="regexp">
',
'
</tt>
');
}
return
use_
code_
wrappers
(
$_
[
0
],
'
<tt class="regexp">
',
'
</tt>
');
}
sub
do_cmd_character
{
return
use_wrappers
(
$_
[
0
],
'
"<tt class="character">
',
'
</tt>"
');
}
return
use_
code_
wrappers
(
$_
[
0
],
'
"<tt class="character">
',
'
</tt>"
');
}
sub
do_cmd_program
{
return
use_wrappers
(
$_
[
0
],
'
<b class="program">
',
'
</b>
');
}
sub
do_cmd_programopt
{
...
...
@@ -232,7 +246,7 @@ sub do_cmd_file{
sub
do_cmd_filenq
{
return
do_cmd_file
(
$_
[
0
]);
}
sub
do_cmd_samp
{
return
use_wrappers
(
$_
[
0
],
'
"<tt class="samp">
',
'
</tt>"
');
}
return
use_
code_
wrappers
(
$_
[
0
],
'
"<tt class="samp">
',
'
</tt>"
');
}
sub
do_cmd_kbd
{
return
use_wrappers
(
$_
[
0
],
'
<kbd>
',
'
</kbd>
');
}
sub
do_cmd_strong
{
...
...
@@ -617,7 +631,7 @@ sub idx_cmd_indexiv($){
define_indexing_macro
('
ttindex
');
sub
idx_cmd_ttindex
($){
my
$str
=
next_argument
(
);
my
$str
=
codetext
(
next_argument
()
);
my
$entry
=
$str
.
get_indexsubitem
();
add_index_entry
(
$entry
,
$_
[
0
]);
}
...
...
@@ -2049,10 +2063,10 @@ sub do_env_alltt{
undef
$open_tags_R
;
undef
@save_open_tags
;
};
$open_tags_R
=
[
@keep_open_tags
];
$_
;
return
codetext
(
$_
)
;
}
# List of all filenames produced
n
y do_cmd_verbatiminput()
# List of all filenames produced
m
y do_cmd_verbatiminput()
%
VerbatimFiles
=
();
@VerbatimOutputs
=
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment