diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-23 00:08:57 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-23 00:08:57 +0000 |
commit | a41b969da761feea5444b03064068a11e9fd23d6 (patch) | |
tree | c602960e0d19e9af540c4a1e0fe232224e033aec /mdoc_html.c | |
parent | f64bbf4dd52ba1784bd58528b49c64503687d995 (diff) | |
download | mandoc-a41b969da761feea5444b03064068a11e9fd23d6.tar.gz |
Add support for `Sm' in -T[x]html -mdoc.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 11e92443..def1c0e0 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -125,6 +125,7 @@ static int mdoc_pq_pre(MDOC_ARGS); static int mdoc_rs_pre(MDOC_ARGS); static int mdoc_rv_pre(MDOC_ARGS); static int mdoc_sh_pre(MDOC_ARGS); +static int mdoc_sm_pre(MDOC_ARGS); static int mdoc_sp_pre(MDOC_ARGS); static void mdoc_sq_post(MDOC_ARGS); static int mdoc_sq_pre(MDOC_ARGS); @@ -227,7 +228,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {NULL, NULL}, /* Sc */ {mdoc_sq_pre, mdoc_sq_post}, /* So */ {mdoc_sq_pre, mdoc_sq_post}, /* Sq */ - {NULL, NULL}, /* Sm */ /* FIXME - no idea. */ + {mdoc_sm_pre, NULL}, /* Sm */ {mdoc_sx_pre, NULL}, /* Sx */ {mdoc_sy_pre, NULL}, /* Sy */ {NULL, NULL}, /* Tn */ @@ -1722,6 +1723,23 @@ mdoc_fn_pre(MDOC_ARGS) /* ARGSUSED */ static int +mdoc_sm_pre(MDOC_ARGS) +{ + + assert(n->child && MDOC_TEXT == n->child->type); + if (0 == strcmp("on", n->child->string)) { + /* FIXME: no p->col to check... */ + h->flags &= ~HTML_NOSPACE; + h->flags &= ~HTML_NONOSPACE; + } else + h->flags |= HTML_NONOSPACE; + + return(0); +} + + +/* ARGSUSED */ +static int mdoc_sp_pre(MDOC_ARGS) { int len; |