aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-10 23:36:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-10 23:36:34 +0000
commit01d369a8105af24b0d6df42f974ff6b8d59dd258 (patch)
treece7914935d83a78777dec29cf29fcf9ae80a22c7 /mdoc_html.c
parentb8b4c05111a45cab71949b527a6060013e5fac66 (diff)
downloadmandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.tar.gz
mandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.tar.zst
mandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.zip
Use new NODE_NOSRC and NODE_NOPRT flags for .Bx and .At.
More rigorous AST and 40 lines less code.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 402a847b..20b344fc 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.245 2017/01/10 21:59:47 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.246 2017/01/10 23:36:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -71,7 +71,6 @@ static void mdoc_bk_post(MDOC_ARGS);
static int mdoc_bk_pre(MDOC_ARGS);
static int mdoc_bl_pre(MDOC_ARGS);
static int mdoc_bt_pre(MDOC_ARGS);
-static int mdoc_bx_pre(MDOC_ARGS);
static int mdoc_cd_pre(MDOC_ARGS);
static int mdoc_d1_pre(MDOC_ARGS);
static int mdoc_dv_pre(MDOC_ARGS);
@@ -183,7 +182,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = {
{mdoc_quote_pre, mdoc_quote_post}, /* Bo */
{mdoc_quote_pre, mdoc_quote_post}, /* Bq */
{mdoc_xx_pre, NULL}, /* Bsx */
- {mdoc_bx_pre, NULL}, /* Bx */
+ {mdoc_xx_pre, NULL}, /* Bx */
{mdoc_skip_pre, NULL}, /* Db */
{NULL, NULL}, /* Dc */
{mdoc_quote_pre, mdoc_quote_post}, /* Do */
@@ -740,33 +739,6 @@ mdoc_xx_pre(MDOC_ARGS)
}
static int
-mdoc_bx_pre(MDOC_ARGS)
-{
- struct htmlpair tag;
-
- PAIR_CLASS_INIT(&tag, "unix");
- print_otag(h, TAG_SPAN, 1, &tag);
-
- if (NULL != (n = n->child)) {
- print_text(h, n->string);
- h->flags |= HTML_NOSPACE;
- print_text(h, "BSD");
- } else {
- print_text(h, "BSD");
- return 0;
- }
-
- if (NULL != (n = n->next)) {
- h->flags |= HTML_NOSPACE;
- print_text(h, "-");
- h->flags |= HTML_NOSPACE;
- print_text(h, n->string);
- }
-
- return 0;
-}
-
-static int
mdoc_it_pre(MDOC_ARGS)
{
struct roffsu su;