rdsrc.pl: allow code paragraphs up to 80 characters long
All the backends support code paragraphs 80+ characters wide (85 for HTML, 90 for PDF) without overrunning the margins. Avoid the noise. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
20be7aaa28
commit
8ce4a58b1a
1 changed files with 7 additions and 5 deletions
12
doc/rdsrc.pl
12
doc/rdsrc.pl
|
@ -660,11 +660,13 @@ sub write_txt {
|
|||
}
|
||||
print "$title\n";
|
||||
} elsif ($ptype eq "code") {
|
||||
# Code paragraph. Emit each line with a seven character indent.
|
||||
foreach $i (@$pname) {
|
||||
warn "code line longer than 68 chars: $i\n" if length $i > 68;
|
||||
print ' 'x7, $i, "\n";
|
||||
}
|
||||
# Code paragraph. Emit each line with a seven character indent.
|
||||
my $maxlen = 80;
|
||||
foreach $i (@$pname) {
|
||||
warn "code line longer than $maxlen chars: $i\n"
|
||||
if ( length($i) > $maxlen );
|
||||
print ' 'x7, $i, "\n";
|
||||
}
|
||||
} elsif ($ptype =~ /^(norm|bull|indt|bquo)$/) {
|
||||
# Ordinary paragraph, optionally indented. We wrap, with ragged
|
||||
# 75-char right margin and either 7 or 11 char left margin
|
||||
|
|
Loading…
Reference in a new issue