diff options
-rw-r--r-- | mdoc_html.c | 13 | ||||
-rw-r--r-- | mdoc_term.c | 11 |
2 files changed, 17 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index c36ea0bb..6501b830 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.145 2011/01/25 15:17:18 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.146 2011/01/25 15:28:56 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -832,7 +832,8 @@ mdoc_xx_pre(MDOC_ARGS) static int mdoc_bx_pre(MDOC_ARGS) { - struct htmlpair tag; + struct htmlpair tag; + char buf[3]; PAIR_CLASS_INIT(&tag, "unix"); print_otag(h, TAG_SPAN, 1, &tag); @@ -847,10 +848,14 @@ mdoc_bx_pre(MDOC_ARGS) } if (NULL != (n = n->next)) { + buf[0] = '-'; + buf[1] = toupper((unsigned char)*n->string); + buf[2] = '\0'; + h->flags |= HTML_NOSPACE; - print_text(h, "-"); + print_text(h, buf); h->flags |= HTML_NOSPACE; - print_text(h, n->string); + print_text(h, n->string + 1); } return(0); diff --git a/mdoc_term.c b/mdoc_term.c index 169b2b4b..3d48b453 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.211 2011/01/25 15:17:18 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.212 2011/01/25 15:28:56 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -1677,6 +1677,7 @@ termp_bd_post(DECL_ARGS) static int termp_bx_pre(DECL_ARGS) { + char buf[3]; if (NULL != (n = n->child)) { term_word(p, n->string); @@ -1688,10 +1689,14 @@ termp_bx_pre(DECL_ARGS) } if (NULL != (n = n->next)) { + buf[0] = '-'; + buf[1] = toupper((unsigned char)*n->string); + buf[2] = '\0'; + p->flags |= TERMP_NOSPACE; - term_word(p, "-"); + term_word(p, buf); p->flags |= TERMP_NOSPACE; - term_word(p, n->string); + term_word(p, n->string + 1); } return(0); |