aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-05-08 17:52:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-05-08 17:52:55 +0000
commit8a7069d03a4019d0695562840e952404eaeb9187 (patch)
tree6f42ef90aee89e8d8f9e61c95a218173b17d3ba9 /mdoc_html.c
parent199eda4478d4d90df3199670dc0ab51b4bb031a6 (diff)
downloadmandoc-8a7069d03a4019d0695562840e952404eaeb9187.tar.gz
mandoc-8a7069d03a4019d0695562840e952404eaeb9187.tar.zst
mandoc-8a7069d03a4019d0695562840e952404eaeb9187.zip
Switch the emitted HTML element from <b> to <code> for the fixed
syntax element macros .Nm, .Fl, .Cm, .Ic, .In, .Fd, .Fn, and .Cd. Adjust both the internal and external style sheets such that rendering remains unchanged in typical browsers. Based on feedback from John Gardner <gardnerjohng at gmail dot com>.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index a6df4700..9c7c0ec2 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.297 2018/04/24 00:36:52 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.298 2018/05/08 17:52:55 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -552,7 +552,7 @@ mdoc_fl_pre(MDOC_ARGS)
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
- print_otag(h, TAG_B, "cTi", "Fl", id);
+ print_otag(h, TAG_CODE, "cTi", "Fl", id);
free(id);
print_text(h, "\\-");
@@ -572,7 +572,7 @@ mdoc_cm_pre(MDOC_ARGS)
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
- print_otag(h, TAG_B, "cTi", "Cm", id);
+ print_otag(h, TAG_CODE, "cTi", "Cm", id);
free(id);
return 1;
}
@@ -598,7 +598,7 @@ mdoc_nm_pre(MDOC_ARGS)
print_otag(h, TAG_TD, "");
/* FALLTHROUGH */
case ROFFT_ELEM:
- print_otag(h, TAG_B, "cT", "Nm");
+ print_otag(h, TAG_CODE, "cT", "Nm");
return 1;
case ROFFT_BODY:
print_otag(h, TAG_TD, "");
@@ -1060,7 +1060,7 @@ static int
mdoc_cd_pre(MDOC_ARGS)
{
synopsis_pre(h, n);
- print_otag(h, TAG_B, "cT", "Cd");
+ print_otag(h, TAG_CODE, "cT", "Cd");
return 1;
}
@@ -1149,11 +1149,11 @@ mdoc_fd_pre(MDOC_ARGS)
assert(n->type == ROFFT_TEXT);
if (strcmp(n->string, "#include")) {
- print_otag(h, TAG_B, "cT", "Fd");
+ print_otag(h, TAG_CODE, "cT", "Fd");
return 1;
}
- print_otag(h, TAG_B, "cT", "In");
+ print_otag(h, TAG_CODE, "cT", "In");
print_text(h, n->string);
if (NULL != (n = n->next)) {
@@ -1239,7 +1239,7 @@ mdoc_fn_pre(MDOC_ARGS)
print_tagq(h, t);
}
- t = print_otag(h, TAG_B, "cT", "Fn");
+ t = print_otag(h, TAG_CODE, "cT", "Fn");
if (sp)
print_text(h, sp);
@@ -1382,7 +1382,7 @@ mdoc_fo_pre(MDOC_ARGS)
return 0;
assert(n->child->string);
- t = print_otag(h, TAG_B, "cT", "Fn");
+ t = print_otag(h, TAG_CODE, "cT", "Fn");
print_text(h, n->child->string);
print_tagq(h, t);
return 0;
@@ -1406,7 +1406,7 @@ mdoc_in_pre(MDOC_ARGS)
struct tag *t;
synopsis_pre(h, n);
- print_otag(h, TAG_B, "cT", "In");
+ print_otag(h, TAG_CODE, "cT", "In");
/*
* The first argument of the `In' gets special treatment as
@@ -1452,7 +1452,7 @@ mdoc_ic_pre(MDOC_ARGS)
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
- print_otag(h, TAG_B, "cTi", "Ic", id);
+ print_otag(h, TAG_CODE, "cTi", "Ic", id);
free(id);
return 1;
}