diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-17 06:44:58 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-17 06:44:58 +0000 |
commit | a6c982532bfd28e9dee86e99b8f6c5102300c294 (patch) | |
tree | 703a57e3dc6da961266a29fd02e142916fb8b756 /mdoc_html.c | |
parent | 4fab3c6e074ed129fedec660b155817a528496d3 (diff) | |
download | mandoc-a6c982532bfd28e9dee86e99b8f6c5102300c294.tar.gz |
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@.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 04d3883e..c64d38c4 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -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 */ @@ -1884,6 +1885,16 @@ mdoc_rs_pre(MDOC_ARGS) } 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) { struct htmlpair tag; |