aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-17 06:44:58 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-17 06:44:58 +0000
commita95737d0fe7d58cea73235887cdce9f58bae1335 (patch)
treeb1e382b6e729e9db6aff88da6d68fc0cb999f2af /mdoc_html.c
parent194fdd32fe2e8d95e8130915d406a4509ac1caf7 (diff)
downloadmandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.tar.gz
mandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.tar.zst
mandoc-a95737d0fe7d58cea73235887cdce9f58bae1335.zip
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.c15
1 files changed, 13 insertions, 2 deletions
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 <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;