aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-09-26 00:22:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-09-26 00:22:07 +0000
commit9aae3f150162ed7ad503f4ce199190dddeb01b95 (patch)
treefe5e76c6ee9e64f085108c67045df100bf62b9f1 /mdoc_html.c
parent3cdfb1967e807030ce1e87a6b10ce613b4eae75e (diff)
downloadmandoc-9aae3f150162ed7ad503f4ce199190dddeb01b95.tar.gz
mandoc-9aae3f150162ed7ad503f4ce199190dddeb01b95.tar.zst
mandoc-9aae3f150162ed7ad503f4ce199190dddeb01b95.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 'mdoc_html.c')
-rw-r--r--mdoc_html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index fb37f7e1..eefb7966 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.233 2015/08/30 19:00:14 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.234 2015/09/26 00:22:07 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);