[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Skip the stripper?
From: |
Tadziu Hoffmann |
Subject: |
Re: [groff] Skip the stripper? |
Date: |
Fri, 9 Mar 2018 14:15:20 +0100 |
User-agent: |
NeoMutt/20170421 (1.8.2) |
> I'm going bug-eyed trying to spot where the problem occurs.
On line number 9956 you have a conditional with a multiline
block. The often-seen formatting style for this is
[1]
.if condition \{\
.stuff
.more stuff
.\}
where the last backslash on the first line serves to hide
the newline, so that the actual formatting is
[1a]
.if condition \{.stuff
.more stuff
.\}
However, if you add a comment to the first line, like this:
[2]
.if condition \{\ \" comment
.stuff
.more stuff
.\}
then instead of hiding the newline, you explicitly output a
line containing a single space, similar to
[2a]
.if condition \{\
\<space>
.stuff
.more stuff
.\}
This is normally not what you want, but in this particular
case your macros appear to rely on it, because the stripping
converts [2] back to [1] or [1a], which behaves differently.
My suggestion: don't use a pattern like [2], because it
doesn't make clear what your intent is. If you want a
comment there, use
[3]
.if condition \{.\" comment
.stuff
.more stuff
.\}
and if you explicitly need the line containing a space, use
[3a]
.if condition \{.\" comment
\<space>
.stuff
.more stuff
.\}
I suspect that you didn't actually want that line, but since
the macros did what you wanted, you didn't pursue the matter
further.