summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-09-05 15:43:00 (GMT)
committerFred Drake <fdrake@acm.org>2003-09-05 15:43:00 (GMT)
commit41aa0183989aefce884c457421cd10fa810d124d (patch)
tree62d49c035dd072ae3fdae055b317242d9dfc0178
parentd37154f7f2172d5e9dc4cdaebd6afe543d2ea341 (diff)
downloadcpython-41aa0183989aefce884c457421cd10fa810d124d.zip
cpython-41aa0183989aefce884c457421cd10fa810d124d.tar.gz
cpython-41aa0183989aefce884c457421cd10fa810d124d.tar.bz2
fix some nuissance formatting problems for the "alltt" environment;
there's still a bug for the environment, but that's worked around in this change as well
-rw-r--r--Doc/perl/python.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index da38cd2..cddba8c 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -2022,9 +2022,12 @@ sub do_env_alltt{
$_ = &translate_environments($_);
$_ = &translate_commands($_) if (/\\/);
- # preserve space-runs, using &nbsp;
- while (s/(\S) ( +)/$1$2;SPMnbsp;/g){};
- s/(<BR>) /$1;SPMnbsp;/g;
+ # remove spurious <BR> someone sticks in; not sure where they
+ # actually come from
+ # XXX the replacement space is there to accomodate something
+ # broken that inserts a space in front of the first line of
+ # the environment
+ s/<BR>/ /gi;
$_ = join('', $closures, $alltt_start, $local_reopens
, $_