diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-03 19:02:45 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-03 19:02:45 +0000 |
commit | a2f67c7d18ceda8536106b49b654d813a881dbd0 (patch) | |
tree | 1fb032f811c8d97bfccb9b8bf393ab8ba4c52c99 /mdoc_html.c | |
parent | 8fe1cdd8be9175643189a97f43eca2fe20e59200 (diff) | |
download | mandoc-a2f67c7d18ceda8536106b49b654d813a881dbd0.tar.gz |
`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.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 3a8911dc..71808ddf 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -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"; |