Up to version 1.22.4, groff_mdoc(7) only considered the first word
authorschwarze <schwarze@openbsd.org>
Fri, 19 Aug 2022 12:49:36 +0000 (12:49 +0000)
committerschwarze <schwarze@openbsd.org>
Fri, 19 Aug 2022 12:49:36 +0000 (12:49 +0000)
commita0c8730ce5aaf571286843147f141a527c1df74a
treedd64e4f67147378c91ee81e4a85ae76f0ecc8b0b
parent99dbdb7f37c7d4919ca554be92389894fe017ade
Up to version 1.22.4, groff_mdoc(7) only considered the first word
when comparing section headers.  For example, ".Sh SEE ELSEWHERE"
and ".Sh SEE Em ALSO" were considered instances of a SEE ALSO
section.  In groff-current, exact matches with no sub-macros are
required.  Adjust mandoc behaviour.

While here, also fix a very minor mandoc bug, even though no
detrimental effect of the bug on formatting is known.  While using
sub-macros in the .Sh HEAD is bad style, the parsers accept it, so
setting the section attribute on the HEAD needs to act recursively.
regress/usr.bin/mandoc/mdoc/Rs/break.in
regress/usr.bin/mandoc/mdoc/Rs/break.out_ascii
regress/usr.bin/mandoc/mdoc/Rs/break.out_markdown
regress/usr.bin/mandoc/mdoc/Rs/break.out_utf8
usr.bin/mandoc/mdoc_state.c