diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-25 15:17:18 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-25 15:17:18 +0000 |
commit | 99f9e0ced799039092a15e576a2ba9f04fff9d0a (patch) | |
tree | 6ee3c1b0bef7f50ae8d988e0792388c48da9e5de /mdoc_html.c | |
parent | 7af39d09674498b502965c63cb5f54c73013e86b (diff) | |
download | mandoc-99f9e0ced799039092a15e576a2ba9f04fff9d0a.tar.gz |
Have `Bx' accept two arguments, not just one, and join these arguments
with "xxBSD-yy"
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 1697ac32..9d83553d 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -832,19 +832,27 @@ mdoc_xx_pre(MDOC_ARGS) static int mdoc_bx_pre(MDOC_ARGS) { - const struct mdoc_node *nn; - struct htmlpair tag; + struct htmlpair tag; PAIR_CLASS_INIT(&tag, "unix"); print_otag(h, TAG_SPAN, 1, &tag); - for (nn = n->child; nn; nn = nn->next) - print_mdoc_node(m, nn, h); + if (NULL != (n = n->child)) { + print_text(h, n->string); + h->flags |= HTML_NOSPACE; + print_text(h, "BSD"); + } else { + print_text(h, "BSD"); + return(0); + } - if (n->child) + if (NULL != (n = n->next)) { h->flags |= HTML_NOSPACE; + print_text(h, "-"); + h->flags |= HTML_NOSPACE; + print_text(h, n->string); + } - print_text(h, "BSD"); return(0); } |