aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-19 15:48:39 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-19 15:48:39 +0000
commit7497d172e9388ae343a013457bf16bff6b39b3e1 (patch)
treef4e02808c926b99cc0f691916efd8804ef242578
parentb7bb50b52763fb6212e5896c4f48f67e7e24944a (diff)
downloadmandoc-7497d172e9388ae343a013457bf16bff6b39b3e1.tar.gz
mandoc-7497d172e9388ae343a013457bf16bff6b39b3e1.tar.zst
mandoc-7497d172e9388ae343a013457bf16bff6b39b3e1.zip
clean up .Sx and .Xr HTML markup
-rw-r--r--mandoc.css7
-rw-r--r--mdoc_html.c14
2 files changed, 10 insertions, 11 deletions
diff --git a/mandoc.css b/mandoc.css
index 20348694..6990db73 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -1,4 +1,4 @@
-/* $Id: mandoc.css,v 1.5 2017/01/19 15:27:34 schwarze Exp $ */
+/* $Id: mandoc.css,v 1.6 2017/01/19 15:48:39 schwarze Exp $ */
/*
* Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
*/
@@ -53,6 +53,8 @@ h2.Ss { margin-top: 2ex;
margin-left: -2ex;
font-size: 105%; }
div.Pp { margin: 1ex 0ex; }
+a.Sx { }
+a.Xr { }
blockquote { margin-left: 5ex; margin-top: 0ex; margin-bottom: 0ex; } /* D1. */
@@ -91,7 +93,6 @@ b.fname { font-style: normal; } /* Function name (Fa, Fn, Rv). */
i.ftype { font-weight: normal; } /* Function types (Ft, Fn). */
b.includes { font-style: normal; } /* Header includes (In). */
span.lib { } /* Library (Lb). */
-i.link-sec { font-weight: normal; } /* Section links (Sx). */
b.macro { font-style: normal; } /* Macro-ish thing (Fd). */
b.name { font-style: normal; } /* Name of utility (Nm). */
span.opt { } /* Options (Op, Oo/Oc). */
@@ -117,9 +118,7 @@ b.var { font-style: normal; } /* Variables (Rv). */
a.link-ext { } /* Off-site link (Lk). */
a.link-includes { } /* Include-file link (In). */
a.link-mail { } /* Mailto links (Mt). */
-a.link-man { } /* Manual links (Xr). */
a.link-ref { } /* Reference section links (%Q). */
-a.link-sec { } /* Section links (Sx). */
/* Formatting for lists. See mdoc(7). */
diff --git a/mdoc_html.c b/mdoc_html.c
index 49881ff0..fe9c8180 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.253 2017/01/19 15:27:34 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.254 2017/01/19 15:48:39 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}