summaryrefslogtreecommitdiffstats
path: root/Doc/perl/python.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-06-18 18:30:28 (GMT)
committerFred Drake <fdrake@acm.org>2002-06-18 18:30:28 (GMT)
commit4837fa3a540c13bfbc734924c5776295734289c6 (patch)
treebdd810fab4a81e496138f436e2b3418eec231b8e /Doc/perl/python.perl
parentf6e902717e07907d084037e7e0a630e09dacef3f (diff)
downloadcpython-4837fa3a540c13bfbc734924c5776295734289c6.zip
cpython-4837fa3a540c13bfbc734924c5776295734289c6.tar.gz
cpython-4837fa3a540c13bfbc734924c5776295734289c6.tar.bz2
\productioncont: Replace leading spaces with &nbsp; so that it's
possible to control the indentation of continuation lines. cfuncline_helper(): Only mark the argument names are <var>, not the whole argument list. This leaves the argument types in the same font as the return type. Based on a casual suggestion from Guido.
Diffstat (limited to 'Doc/perl/python.perl')
-rw-r--r--Doc/perl/python.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 2eb1d6f..3fc7454 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -808,6 +808,7 @@ sub do_cmd_production{
sub do_cmd_productioncont{
local($_) = @_;
my $defn = next_argument();
+ $defn =~ s/^( +)/'&nbsp;' x length $1/e;
return ("<tr valign=\"baseline\">\n"
. " <td>&nbsp;</td>\n"
. " <td>&nbsp;</td>\n"
@@ -911,6 +912,8 @@ sub cfuncline_helper($$$){
"<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem());
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//; # ???? - why both of these?
+ $args =~ s/(\s|\*)([a-z_][a-z_0-9]*),/\1<var>\2<\/var>,/g;
+ $args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/\1<var>\2<\/var>/s;
return "$type <b>$idx</b>(<var>$args</var>)";
}
sub do_cmd_cfuncline{