CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/10/03 08:03:49
Modified files:
usr.bin/mandoc : mdoc_validate.c
Log message:
If the -width of a .Bl macro is of the form ".word text",
use only the text for measuring the width, assuming the word is a macro,
as a crude approximation of what groff_mdoc(7) does: it sets the
argument in a diversion and measures the width of the diversion.
Ugly formatting first reported by Franco Fichtner (DragonFly BSD) in 2013,
this partial fix first suggested by me in the mandoc TODO file in 2013,
then implemented by Eric van Gyzen (FreeBSD) in 2022.
My fix committed here is slightly smaller than Eric's FreeBSD fix,
does not need an extra function, and stays closer to groff behaviour.