diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 23:54:43 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 23:54:43 +0000 |
commit | 9ac12ebbb5d0074ff2b72330511a385e44e2814e (patch) | |
tree | 2b49dd841908eef38040cd34e6b6f35d928c8254 /mdoc_term.c | |
parent | adc3be19ec3ddf59cd25426c2002ceffca319207 (diff) | |
download | mandoc-9ac12ebbb5d0074ff2b72330511a385e44e2814e.tar.gz mandoc-9ac12ebbb5d0074ff2b72330511a385e44e2814e.tar.zst mandoc-9ac12ebbb5d0074ff2b72330511a385e44e2814e.zip |
-Tascii correctly prints `%T' in `Rs' with quotes.
-Thtml behaves like -Tascii for printing.
Printing of `Rs' elements cross-checked with new groff.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 2398793a..f8fc98af 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.83 2009/09/24 15:01:06 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.84 2009/09/24 23:54:43 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -106,6 +106,7 @@ static void termp_sq_post(DECL_ARGS); static void termp_ss_post(DECL_ARGS); static void termp_vt_post(DECL_ARGS); +static int termp__t_pre(DECL_ARGS); static int termp_an_pre(DECL_ARGS); static int termp_ap_pre(DECL_ARGS); static int termp_aq_pre(DECL_ARGS); @@ -189,15 +190,15 @@ static const struct termact termacts[MDOC_MAX] = { { termp_under_pre, termp_vt_post }, /* Vt */ { termp_xr_pre, NULL }, /* Xr */ { NULL, termp____post }, /* %A */ - { NULL, termp____post }, /* %B */ + { termp_under_pre, termp____post }, /* %B */ { NULL, termp____post }, /* %D */ - { NULL, termp____post }, /* %I */ + { termp_under_pre, termp____post }, /* %I */ { termp_under_pre, termp____post }, /* %J */ { NULL, termp____post }, /* %N */ { NULL, termp____post }, /* %O */ { NULL, termp____post }, /* %P */ { NULL, termp____post }, /* %R */ - { termp_under_pre, termp____post }, /* %T */ + { termp__t_pre, termp____post }, /* %T */ { NULL, termp____post }, /* %V */ { NULL, NULL }, /* Ac */ { termp_aq_pre, termp_aq_post }, /* Ao */ @@ -2065,6 +2066,14 @@ termp____post(DECL_ARGS) { p->flags |= TERMP_NOSPACE; + switch (node->tok) { + case (MDOC__T): + term_word(p, "\\(rq"); + p->flags |= TERMP_NOSPACE; + break; + default: + break; + } term_word(p, node->next ? "," : "."); } @@ -2107,3 +2116,13 @@ termp_under_pre(DECL_ARGS) return(1); } + +/* ARGSUSED */ +static int +termp__t_pre(DECL_ARGS) +{ + + term_word(p, "\\(lq"); + p->flags |= TERMP_NOSPACE; + return(1); +} |