summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-10 21:59:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-10 21:59:47 +0000
commit88adc8bfc4d6844007b7f059956fa0ce17eeee04 (patch)
tree32d857ff2af5c7ae9fe4ecd04d18ff8df147e3cb /mdoc_html.c
parent3482d390049361a46fc425fe5791c97b2967bbdf (diff)
downloadmandoc-88adc8bfc4d6844007b7f059956fa0ce17eeee04.tar.gz
For the .Ux/.Ox family of macros, do text production at the validation
stage rather than in each and every individual formatter, using the new NODE_NOSRC flag. More rigorous and also ten lines less code.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 7251be73..4409964d 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -732,44 +732,11 @@ mdoc_ar_pre(MDOC_ARGS)
static int
mdoc_xx_pre(MDOC_ARGS)
{
- const char *pp;
struct htmlpair tag;
- int flags;
-
- switch (n->tok) {
- case MDOC_Bsx:
- pp = "BSD/OS";
- break;
- case MDOC_Dx:
- pp = "DragonFly";
- break;
- case MDOC_Fx:
- pp = "FreeBSD";
- break;
- case MDOC_Nx:
- pp = "NetBSD";
- break;
- case MDOC_Ox:
- pp = "OpenBSD";
- break;
- case MDOC_Ux:
- pp = "UNIX";
- break;
- default:
- return 1;
- }
PAIR_CLASS_INIT(&tag, "unix");
print_otag(h, TAG_SPAN, 1, &tag);
-
- print_text(h, pp);
- if (n->child) {
- flags = h->flags;
- h->flags |= HTML_KEEP;
- print_text(h, n->child->string);
- h->flags = flags;
- }
- return 0;
+ return 1;
}
static int