summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-25 15:28:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-25 15:28:56 +0000
commit5429c6324d2969b17da51f6de9f445e7bb44294b (patch)
treec6109493394aa20eeb8da1d34cde23327f9cfec0 /mdoc_html.c
parentd78af72a5fc16f78890e7b519b7b1b5da7aabd39 (diff)
downloadmandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.tar.gz
mandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.tar.zst
mandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.zip
Properly uppercase the first-letter of the `Bx' second argument.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c13
1 files changed, 9 insertions, 4 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);