summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-01-19 15:48:34 +0000
committerschwarze <schwarze@openbsd.org>2017-01-19 15:48:34 +0000
commitf86dbec6dd28543fc7b9d159c8bdfdfc1b107e59 (patch)
tree8321a27c5ad7a9374e7462b3f8b1b045dffc855b /usr.bin/mandoc/mdoc_html.c
parentClean up CSS rules for sections and paragraphs. (diff)
downloadwireguard-openbsd-f86dbec6dd28543fc7b9d159c8bdfdfc1b107e59.tar.xz
wireguard-openbsd-f86dbec6dd28543fc7b9d159c8bdfdfc1b107e59.zip
clean up .Sx and .Xr HTML markup
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index bec67201266..04ad77fff93 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.128 2017/01/19 15:27:26 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.129 2017/01/19 15:48:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -46,6 +46,7 @@ struct htmlmdoc {
void (*post)(MDOC_ARGS);
};
+static char *make_id(const struct roff_node *);
static void print_mdoc_head(MDOC_ARGS);
static void print_mdoc_node(MDOC_ARGS);
static void print_mdoc_nodelist(MDOC_ARGS);
@@ -490,7 +491,7 @@ mdoc_root_pre(MDOC_ARGS)
return 1;
}
-char *
+static char *
make_id(const struct roff_node *n)
{
const struct roff_node *nch;
@@ -633,11 +634,11 @@ mdoc_xr_pre(MDOC_ARGS)
return 0;
if (h->base_man)
- print_otag(h, TAG_A, "chM", "link-man",
+ print_otag(h, TAG_A, "chM", "Xr",
n->child->string, n->child->next == NULL ?
NULL : n->child->next->string);
else
- print_otag(h, TAG_A, "c", "link-man");
+ print_otag(h, TAG_A, "c", "Xr");
n = n->child;
print_text(h, n->string);
@@ -860,12 +861,11 @@ mdoc_sx_pre(MDOC_ARGS)
{
char *id;
- print_otag(h, TAG_I, "c", "link-sec");
if ((id = make_id(n)) != NULL) {
- print_otag(h, TAG_A, "chR", "link-sec", id);
+ print_otag(h, TAG_A, "chR", "Sx", id);
free(id);
} else
- print_otag(h, TAG_A, "c", "link-sec");
+ print_otag(h, TAG_A, "c", "Sx");
return 1;
}