summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2023-10-18 16:11:30 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2023-10-18 16:11:30 +0000
commit396f26c890dbbe05e880a221176b7ceb1b35164c (patch)
tree3ad886b2d698ecd0dcb3cc633f69c434f5246f36 /usr.bin/mandoc
parentae17164e3b9f2dbf2e01b2a4cb0c3fe22930d580 (diff)
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>.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/man_html.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 5e0bffebd53..581f837255a 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_html.c,v 1.138 2023/04/28 20:14:19 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.139 2023/10/18 16:11:29 schwarze Exp $ */
/*
* Copyright (c) 2013-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -431,10 +431,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;
}