mirror of
https://github.com/python/cpython.git
synced 2025-07-25 20:24:11 +00:00
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
This commit is contained in:
parent
d37154f7f2
commit
41aa018398
1 changed files with 6 additions and 3 deletions
|
@ -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/(<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
|
||||
, $_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue