diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-26 00:22:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-26 00:22:07 +0000 |
commit | cf4ee529866fc3539febb53c98766723a5306a7f (patch) | |
tree | cd34f380cc1ea5c3c09a9f777b42e6b1b538862e | |
parent | 470366250d61bb7e6db9e4f8b6db377e3f4b6949 (diff) | |
download | mandoc-cf4ee529866fc3539febb53c98766723a5306a7f.tar.gz |
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.
-rw-r--r-- | mdoc_html.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 29713752..878bbce6 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -642,7 +642,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) @@ -650,6 +649,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); @@ -664,7 +665,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); |