From a95737d0fe7d58cea73235887cdce9f58bae1335 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 17 Nov 2014 06:44:58 +0000 Subject: Multiple fixes with respect to in-line macros: * .No selects the default font; relevant e.g. in .Bf blocks * no need to force empty .Li elements * closing delimiters as leading macro arguments do not suppress space * opening delimiters at the end of a macro line do not suppress space * correctly handle delimiter spacing in -Tman As a side effect, these fixes let mandoc warn about empty .No macros as requested by bentley@. --- mdoc_html.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'mdoc_html.c') diff --git a/mdoc_html.c b/mdoc_html.c index 1ca378f6..1d0c2d0e 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.209 2014/10/30 20:10:02 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.210 2014/11/17 06:44:58 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -98,6 +98,7 @@ static int mdoc_mt_pre(MDOC_ARGS); static int mdoc_ms_pre(MDOC_ARGS); static int mdoc_nd_pre(MDOC_ARGS); static int mdoc_nm_pre(MDOC_ARGS); +static int mdoc_no_pre(MDOC_ARGS); static int mdoc_ns_pre(MDOC_ARGS); static int mdoc_pa_pre(MDOC_ARGS); static void mdoc_pf_post(MDOC_ARGS); @@ -192,7 +193,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {mdoc_quote_pre, mdoc_quote_post}, /* Eo */ {mdoc_xx_pre, NULL}, /* Fx */ {mdoc_ms_pre, NULL}, /* Ms */ - {mdoc_igndelim_pre, NULL}, /* No */ + {mdoc_no_pre, NULL}, /* No */ {mdoc_ns_pre, NULL}, /* Ns */ {mdoc_xx_pre, NULL}, /* Nx */ {mdoc_xx_pre, NULL}, /* Ox */ @@ -1883,6 +1884,16 @@ mdoc_rs_pre(MDOC_ARGS) return(1); } +static int +mdoc_no_pre(MDOC_ARGS) +{ + struct htmlpair tag; + + PAIR_CLASS_INIT(&tag, "none"); + print_otag(h, TAG_CODE, 1, &tag); + return(1); +} + static int mdoc_li_pre(MDOC_ARGS) { -- cgit v1.2.3