tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* eqn delimiters break conditionals
@ 2021-09-08 13:24 наб
  2021-09-09 12:21 ` Ingo Schwarze
  0 siblings, 1 reply; 3+ messages in thread
From: наб @ 2021-09-08 13:24 UTC (permalink / raw)
  To: tech

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

Hi!

Consider the following file:
-- >8 --
.EQ
delim %%
.EN
.if 0 A % B % C
.if 1 D % E % F
-- >8 --

What'd you expect to see here? I'd expect D E F, with eqnified E,
and groff agrees:
-- >8 --
$ groff -e -Tutf8 < a.1 | grep -v '^$'
D E F
-- >8 --

However, mandoc (1.14.4-1 and latest CVS as of an hour ago) does not:
-- >8 --
$ ./mandoc < a.1 | grep -v '^$'
()                                                                          ()
 B C D E F
                                                                            ()
-- >8 --


Disabling eqn inline delimiters gives us the expected from both:
-- >8 --
$ cat a.1
.if 0 A % B % C
.if 1 D % E % F

$ groff -e -Tutf8 < a.1 | grep -v '^$'
D % E % F

$ ./mandoc < a.1 | grep -v '^$'
()                                                                          ()
D % E % F
                                                                            ()
-- >8 --


This smells like a bug to me, for reasons I assume obvious.

Best,
наб

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-09 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 13:24 eqn delimiters break conditionals наб
2021-09-09 12:21 ` Ingo Schwarze
2021-09-09 17:12   ` наб

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).