Hi! On Mon, Jun 06, 2022 at 12:44:44PM +0200, Ingo Schwarze wrote: > That's even more surprising; .Bx is never a block macro, so maybe > there is another bug or the bug has a different reason after all. Encouraged by your simple diagnosis, I had a minor go: Given: -- >8 -- .Sh NAME .Nm tr .Nd trupsko .Sh DESCRIPTION .Bd -literal .Nm .Ed .Sh DESCRIPTION2 .Bd -literal .Nm tr2 .Ed .Sh DESCRIPTION3 .Bd -literal .Bx .Ed .Sh DESCRIPTION3 .Bd -literal trupsko .Ed -- >8 -- -Ttree gives -- >8 -- title = "UNTITLED" name = "tr" vol = "LOCAL" os = "" date = "" Sh (block) *1:2 Sh (head) 1:2 ID=HREF NAME (text) 1:5 Sh (body) 1:2 Nm (elem) *2:2 tr (text) 2:5 Nd (block) *3:2 Nd (head) 3:2 Nd (body) 3:2 trupsko (text) 3:5 Sh (block) *4:2 Sh (head) 4:2 ID=HREF DESCRIPTION (text) 4:5 Sh (body) 4:2 Bd (block) -literal *5:2 Bd (head) 5:2 Bd (body) 5:2 Nm (elem) *6:2 NOFILL tr (text) 6:2 NOSRC Sh (block) *8:2 Sh (head) 8:2 ID=HREF DESCRIPTION2 (text) 8:5 Sh (body) 8:2 Bd (block) -literal *9:2 Bd (head) 9:2 Bd (body) 9:2 Nm (elem) *10:2 NOFILL tr2 (text) 10:5 NOFILL Sh (block) *12:2 Sh (head) 12:2 ID=HREF DESCRIPTION3 (text) 12:5 Sh (body) 12:2 Bd (block) -literal *13:2 Bd (head) 13:2 Bd (body) 13:2 Bx (elem) *14:2 NOFILL BSD (text) 14:2 NOSRC Sh (block) *16:2 Sh (head) 16:2 ID=HREF DESCRIPTION3 (text) 16:5 Sh (body) 16:2 Bd (block) -literal *17:2 Bd (head) 17:2 Bd (body) 17:2 trupsko (text) *18:1 NOFILL -- >8 -- But -Ttree -Onoval gives: -- >8 -- Sh (block) *1:2 Sh (head) 1:2 NAME (text) 1:5 Sh (body) 1:2 Nm (elem) *2:2 tr (text) 2:5 Nd (block) *3:2 Nd (head) 3:2 Nd (body) 3:2 trupsko (text) 3:5 Sh (block) *4:2 Sh (head) 4:2 DESCRIPTION (text) 4:5 Sh (body) 4:2 Bd (block) -literal *5:2 Bd (head) 5:2 Bd (body) 5:2 Nm (elem) *6:2 NOFILL Sh (block) *8:2 Sh (head) 8:2 DESCRIPTION2 (text) 8:5 Sh (body) 8:2 Bd (block) -literal *9:2 Bd (head) 9:2 Bd (body) 9:2 Nm (elem) *10:2 NOFILL tr2 (text) 10:5 NOFILL Sh (block) *12:2 Sh (head) 12:2 DESCRIPTION3 (text) 12:5 Sh (body) 12:2 Bd (block) -literal *13:2 Bd (head) 13:2 Bd (body) 13:2 Bx (elem) *14:2 NOFILL Sh (block) *16:2 Sh (head) 16:2 DESCRIPTION3 (text) 16:5 Sh (body) 16:2 Bd (block) -literal *17:2 Bd (head) 17:2 Bd (body) 17:2 trupsko (text) *18:1 NOFILL -- >8 -- For a diff of -- >8 -- diff --git a/tr b/nova index aa4b73c..b177b2e 100644 --- a/tr +++ b/nova @@ -1,5 +0,0 @@ -title = "UNTITLED" -name = "tr" -vol = "LOCAL" -os = "" -date = "" @@ -8 +3 @@ Sh (block) *1:2 - Sh (head) 1:2 ID=HREF + Sh (head) 1:2 @@ -18 +13 @@ Sh (block) *4:2 - Sh (head) 4:2 ID=HREF + Sh (head) 4:2 @@ -25 +19,0 @@ Sh (block) *4:2 - tr (text) 6:2 NOSRC @@ -27 +21 @@ Sh (block) *8:2 - Sh (head) 8:2 ID=HREF + Sh (head) 8:2 @@ -36 +30 @@ Sh (block) *12:2 - Sh (head) 12:2 ID=HREF + Sh (head) 12:2 @@ -43 +36,0 @@ Sh (block) *12:2 - BSD (text) 14:2 NOSRC @@ -45 +38 @@ Sh (block) *16:2 - Sh (head) 16:2 ID=HREF + Sh (head) 16:2 -- >8 -- Note how the text injected by the validator is NOSRC while the "raw" text, and the text in .Nm tr2 is NOFILL. I (naively) replaced all NODE_NOSRC with NODE_NOSRC | NODE_NOFILL in mdoc_validate.c (none of them had it previously), to great success! -Ttree now yielded: -- >8 -- title = "UNTITLED" name = "tr" vol = "LOCAL" os = "" date = "" Sh (block) *1:2 Sh (head) 1:2 ID=HREF NAME (text) 1:5 Sh (body) 1:2 Nm (elem) *2:2 tr (text) 2:5 Nd (block) *3:2 Nd (head) 3:2 Nd (body) 3:2 trupsko (text) 3:5 Sh (block) *4:2 Sh (head) 4:2 ID=HREF DESCRIPTION (text) 4:5 Sh (body) 4:2 Bd (block) -literal *5:2 Bd (head) 5:2 Bd (body) 5:2 Nm (elem) *6:2 NOFILL tr (text) 6:2 NOFILL NOSRC Sh (block) *8:2 Sh (head) 8:2 ID=HREF DESCRIPTION2 (text) 8:5 Sh (body) 8:2 Bd (block) -literal *9:2 Bd (head) 9:2 Bd (body) 9:2 Nm (elem) *10:2 NOFILL tr2 (text) 10:5 NOFILL Sh (block) *12:2 Sh (head) 12:2 ID=HREF DESCRIPTION3 (text) 12:5 Sh (body) 12:2 Bd (block) -literal *13:2 Bd (head) 13:2 Bd (body) 13:2 Bx (elem) *14:2 NOFILL BSD (text) 14:2 NOFILL NOSRC Sh (block) *16:2 Sh (head) 16:2 ID=HREF DESCRIPTION3 (text) 16:5 Sh (body) 16:2 Bd (block) -literal *17:2 Bd (head) 17:2 Bd (body) 17:2 trupsko (text) *18:1 NOFILL -- >8 -- And the .Bd -literals in -Thtml were all fixed, too! -- >8 --
tr
tr2
BSD
trupsko
-- >8 -- There are a lot of elements that generate NOSRC text and I don't know which of them genuinely shouldn't have NOFILL (and there's some conditional ones like you said), but as PoC I think this narrows the problem down. Best, наб