From 35dce537e71343cdee4db304dfb87c588723d065 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 18 Oct 2023 16:11:33 +0000 Subject: 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 . --- man_html.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man_html.c b/man_html.c index 630e2856..3e333e6a 100644 --- a/man_html.c +++ b/man_html.c @@ -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; } -- cgit