diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-19 15:48:39 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-19 15:48:39 +0000 |
commit | d00a6c8c39c12a0eb55f70ecdea9523e056d6577 (patch) | |
tree | 48a5911178647a3b4e27206fe4a07190a123887e /mdoc_html.c | |
parent | 580c890d3b3950c00bf3f40566df511d65a316d6 (diff) | |
download | mandoc-d00a6c8c39c12a0eb55f70ecdea9523e056d6577.tar.gz |
clean up .Sx and .Xr HTML markup
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 74337340..28e2d555 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -48,6 +48,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); @@ -492,7 +493,7 @@ mdoc_root_pre(MDOC_ARGS) return 1; } -char * +static char * make_id(const struct roff_node *n) { const struct roff_node *nch; @@ -635,11 +636,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); @@ -862,12 +863,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; } |