[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warn about long lines
From: |
Ralph Corderoy |
Subject: |
Re: Warn about long lines |
Date: |
Mon, 22 Aug 2022 09:17:51 +0100 |
Hi Alejandro,
> I fear that I might be making one of those structure definitions go
> past the right margin, and there are so many, that it's not funny
> rendering all of them to check
No, it's clearly a job for a machine.
> $ cat longline.man
> .TH a b c d
> .SH foo
> .nf
> this is a very long line that will go past the 80-col right margin, and
> I want to be warned about it.
That's two lines, and it didn't overrun the carriage here.
> .fi
> $
> $ groff -man -ww -z ./longline.man
> $
Isn't that an implicit -Tps? Do you still want an ‘>80’ warning when
it's not a -Tascii, etc?
Here's modified test input and an alternative way to check.
$ cat longline.man
.TH a b c d
.SH foo
.nf
this is a very long line that will go past the 80-col right margin, and \c
I want to be warned about it.
.fi
$ groff -Tutf8 -man -ww longline.man |
> awk 'length > 80 {print; e = 1} END {exit e}'
this is a very long line that will go past the 80-col right margin,
and I want to be warned about it.
$ echo $?
1
$
--
Cheers, Ralph.
- Warn about long lines, Alejandro Colomar, 2022/08/21
- Re: Warn about long lines,
Ralph Corderoy <=
- Re: Warn about long lines, Alejandro Colomar, 2022/08/22
- Re: Warn about long lines, Ralph Corderoy, 2022/08/23
- Re: Warn about long lines, Alejandro Colomar, 2022/08/23
- Re: Warn about long lines, Ralph Corderoy, 2022/08/23
- Re: Warn about long lines, Alejandro Colomar, 2022/08/24
- Re: Warn about long lines, Alejandro Colomar, 2022/08/25
- Re: Warn about long lines, Ralph Corderoy, 2022/08/26
- Re: Warn about long lines, Alejandro Colomar, 2022/08/26
- Re: Warn about long lines, Ingo Schwarze, 2022/08/27
- Re: Warn about long lines, Ralph Corderoy, 2022/08/27