Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41aa018

Browse files
committed
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
1 parent d37154f commit 41aa018

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Doc/perl/python.perl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,9 +2022,12 @@ sub do_env_alltt{
20222022
$_ = &translate_environments($_);
20232023
$_ = &translate_commands($_) if (/\\/);
20242024

2025-
# preserve space-runs, using  
2026-
while (s/(\S) ( +)/$1$2;SPMnbsp;/g){};
2027-
s/(<BR>) /$1;SPMnbsp;/g;
2025+
# remove spurious <BR> someone sticks in; not sure where they
2026+
# actually come from
2027+
# XXX the replacement space is there to accomodate something
2028+
# broken that inserts a space in front of the first line of
2029+
# the environment
2030+
s/<BR>/ /gi;
20282031

20292032
$_ = join('', $closures, $alltt_start, $local_reopens
20302033
, $_

0 commit comments

Comments
 (0)