diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2023-10-18 16:11:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2023-10-18 16:11:33 +0000 |
commit | 35dce537e71343cdee4db304dfb87c588723d065 (patch) | |
tree | e3acf5db7b158a885f21ecc3a71b44baf22de28e | |
parent | 365a305b4dd382bc880129380a8797f544cde0e4 (diff) | |
download | mandoc-35dce537e71343cdee4db304dfb87c588723d065.tar.gz |
Support the GNU-specific syntax ".IP \\[bu]" for bullet lists in man(7)
pages that Alejandro Colomar recommends in the "Lists" subsection of
https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE .
For example, this will improve HTML formatting of the first list in
the subsection "Feature test macros understood by glibc" on the page
https://manpages.debian.org/bookworm/manpages/ftm.7.en.html .
Issue reported by Alejandro Colomar <alx at kernel dot org>.
-rw-r--r-- | man_html.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -433,10 +433,12 @@ list_continues(const struct roff_node *n1, const struct roff_node *n2) s2 = n2 == NULL ? "" : n2->string; c1 = strcmp(s1, "*") == 0 ? '*' : strcmp(s1, "\\-") == 0 ? '-' : - strcmp(s1, "\\(bu") == 0 ? 'b' : ' '; + strcmp(s1, "\\(bu") == 0 ? 'b' : + strcmp(s1, "\\[bu]") == 0 ? 'b' : ' '; c2 = strcmp(s2, "*") == 0 ? '*' : strcmp(s2, "\\-") == 0 ? '-' : - strcmp(s2, "\\(bu") == 0 ? 'b' : ' '; + strcmp(s2, "\\(bu") == 0 ? 'b' : + strcmp(s2, "\\[bu]") == 0 ? 'b' : ' '; return c1 != c2 ? '\0' : c1 == 'b' ? '*' : c1; } |