diff options
author | 2015-09-26 00:18:04 +0000 | |
---|---|---|
committer | 2015-09-26 00:18:04 +0000 | |
commit | 0735395b2177edb4e140975f362046d7ad23e1a5 (patch) | |
tree | 5f6f14a9f4f26c2fd7985f0dfb9df06566fdcbaa /usr.bin/mandoc/mdoc_html.c | |
parent | Trim symbols that aren't part of our new resolver (diff) | |
download | wireguard-openbsd-0735395b2177edb4e140975f362046d7ad23e1a5.tar.xz wireguard-openbsd-0735395b2177edb4e140975f362046d7ad23e1a5.zip |
Fix multiple aspects of SYNOPSIS .Nm formatting:
* Don't break lines before non-block .Nm elements.
* Use proper <b> markup for the heads of .Nm blocks.
* Make the width measurements work by doing them on the head children.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index e2605c1b9ca..4a35c66ac92 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.108 2015/08/30 18:59:44 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.109 2015/09/26 00:18:04 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -640,7 +640,6 @@ mdoc_nm_pre(MDOC_ARGS) switch (n->type) { case ROFFT_ELEM: - synopsis_pre(h, n); PAIR_CLASS_INIT(&tag, "name"); print_otag(h, TAG_B, 1, &tag); if (NULL == n->child && meta->name) @@ -648,6 +647,8 @@ mdoc_nm_pre(MDOC_ARGS) return(1); case ROFFT_HEAD: print_otag(h, TAG_TD, 0, NULL); + PAIR_CLASS_INIT(&tag, "name"); + print_otag(h, TAG_B, 1, &tag); if (NULL == n->child && meta->name) print_text(h, meta->name); return(1); @@ -662,7 +663,7 @@ mdoc_nm_pre(MDOC_ARGS) PAIR_CLASS_INIT(&tag, "synopsis"); print_otag(h, TAG_TABLE, 1, &tag); - for (len = 0, n = n->child; n; n = n->next) + for (len = 0, n = n->head->child; n; n = n->next) if (n->type == ROFFT_TEXT) len += html_strlen(n->string); |