From: Fred Drake Date: Fri, 5 Sep 2003 15:43:00 +0000 (+0000) Subject: fix some nuissance formatting problems for the "alltt" environment; X-Git-Tag: v2.4a1~1634 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41aa0183989aefce884c457421cd10fa810d124d;p=python 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 --- diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index da38cd2590..cddba8c11b 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   - while (s/(\S) ( +)/$1$2;SPMnbsp;/g){}; - s/(
) /$1;SPMnbsp;/g; + # remove spurious
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/
/ /gi; $_ = join('', $closures, $alltt_start, $local_reopens , $_