]> granicus.if.org Git - python/commitdiff
fix some nuissance formatting problems for the "alltt" environment;
authorFred Drake <fdrake@acm.org>
Fri, 5 Sep 2003 15:43:00 +0000 (15:43 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 5 Sep 2003 15:43:00 +0000 (15:43 +0000)
there's still a bug for the environment, but that's worked around in
this change as well

Doc/perl/python.perl

index da38cd25907d9b674877642fde4e1b0114a8a4c8..cddba8c11be8491d9bc3380a45afa55ee8a15414 100644 (file)
@@ -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
                , $_