aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 19:02:45 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 19:02:45 +0000
commit54ddd313a40e4bd0938e09253d80cf14064e78f6 (patch)
tree78249b429f09d04e6b7995504778344b7845a9b5 /mdoc_html.c
parent0f1987fa2a6c8d5bc180dbc56e61442573686174 (diff)
downloadmandoc-54ddd313a40e4bd0938e09253d80cf14064e78f6.tar.gz
mandoc-54ddd313a40e4bd0938e09253d80cf14064e78f6.tar.zst
mandoc-54ddd313a40e4bd0938e09253d80cf14064e78f6.zip
`Fn' does not print empty ftype span.
-Tascii `node' and `meta' args in DECL_ARGS renamed to `n' and `m' to be more coherent with -Thtml.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 2b8f0db4..7b472aeb 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.18 2009/10/03 16:36:06 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.19 2009/10/03 19:02:45 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1438,6 +1438,8 @@ mdoc_an_pre(MDOC_ARGS)
{
struct htmlpair tag;
+ /* TODO: -split and -nosplit (see termp_an_pre()). */
+
tag.key = ATTR_CLASS;
tag.val = "author";
print_otag(h, TAG_SPAN, 1, &tag);
@@ -1616,22 +1618,25 @@ mdoc_fn_pre(MDOC_ARGS)
}
/* Split apart into type and name. */
-
- tag[0].key = ATTR_CLASS;
- tag[0].val = "ftype";
- t = print_otag(h, TAG_SPAN, 1, tag);
-
assert(n->child->string);
sp = n->child->string;
- while (NULL != (ep = strchr(sp, ' '))) {
- sz = MIN((int)(ep - sp), BUFSIZ - 1);
- (void)memcpy(nbuf, sp, (size_t)sz);
- nbuf[sz] = '\0';
- print_text(h, nbuf);
- sp = ++ep;
- }
- print_tagq(h, t);
+ if ((ep = strchr(sp, ' '))) {
+ tag[0].key = ATTR_CLASS;
+ tag[0].val = "ftype";
+
+ t = print_otag(h, TAG_SPAN, 1, tag);
+
+ while (ep) {
+ sz = MIN((int)(ep - sp), BUFSIZ - 1);
+ (void)memcpy(nbuf, sp, (size_t)sz);
+ nbuf[sz] = '\0';
+ print_text(h, nbuf);
+ sp = ++ep;
+ ep = strchr(sp, ' ');
+ }
+ print_tagq(h, t);
+ }
tag[0].key = ATTR_CLASS;
tag[0].val = "fname";