diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-02 18:16:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-02 18:16:57 +0000 |
commit | 372ddb1f38b754bcfe45b662c5d35cfff9b32699 (patch) | |
tree | 71b0d1270bc9af57c0292ab59602556cb85ebbfd | |
parent | 4990e7aa1240908bdb1c35d5ac3b6e87df72ecba (diff) | |
download | mandoc-372ddb1f38b754bcfe45b662c5d35cfff9b32699.tar.gz |
Let .Do .Dq .Ql .So .Sq generate the correct roff(7) character escape
sequences such that output modes like -Tutf8 have a chance to select
nice glyphs. This doesn't change anything for -Tascii, and, for now,
it doesn't affect -Tps and -Tpdf either.
OK matthew@ bentley@; like the idea tedu@; no opinion jmc@.
-rw-r--r-- | mdoc_man.c | 10 | ||||
-rw-r--r-- | mdoc_term.c | 8 |
2 files changed, 9 insertions, 9 deletions
@@ -182,8 +182,8 @@ static const struct manact manacts[MDOC_MAX + 1] = { { NULL, pre_bx, NULL, NULL, NULL }, /* Bx */ { NULL, NULL, NULL, NULL, NULL }, /* Db */ { NULL, NULL, NULL, NULL, NULL }, /* Dc */ - { cond_body, pre_enc, post_enc, "``", "''" }, /* Do */ - { cond_body, pre_enc, post_enc, "``", "''" }, /* Dq */ + { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Do */ + { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Dq */ { NULL, NULL, NULL, NULL, NULL }, /* Ec */ { NULL, NULL, NULL, NULL, NULL }, /* Ef */ { NULL, pre_em, post_font, NULL, NULL }, /* Em */ @@ -199,14 +199,14 @@ static const struct manact manacts[MDOC_MAX + 1] = { { cond_body, pre_enc, post_enc, "(", ")" }, /* Po */ { cond_body, pre_enc, post_enc, "(", ")" }, /* Pq */ { NULL, NULL, NULL, NULL, NULL }, /* Qc */ - { cond_body, pre_enc, post_enc, "`", "'" }, /* Ql */ + { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* Ql */ { cond_body, pre_enc, post_enc, "\"", "\"" }, /* Qo */ { cond_body, pre_enc, post_enc, "\"", "\"" }, /* Qq */ { NULL, NULL, NULL, NULL, NULL }, /* Re */ { cond_body, pre_rs, NULL, NULL, NULL }, /* Rs */ { NULL, NULL, NULL, NULL, NULL }, /* Sc */ - { cond_body, pre_enc, post_enc, "`", "'" }, /* So */ - { cond_body, pre_enc, post_enc, "`", "'" }, /* Sq */ + { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* So */ + { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* Sq */ { NULL, pre_sm, NULL, NULL, NULL }, /* Sm */ { NULL, pre_em, post_font, NULL, NULL }, /* Sx */ { NULL, pre_sy, post_font, NULL, NULL }, /* Sy */ diff --git a/mdoc_term.c b/mdoc_term.c index 7cfb567a..a9b41f15 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1925,7 +1925,7 @@ termp_quote_pre(DECL_ARGS) case (MDOC_Do): /* FALLTHROUGH */ case (MDOC_Dq): - term_word(p, "``"); + term_word(p, "\\(lq"); break; case (MDOC_Eo): break; @@ -1946,7 +1946,7 @@ termp_quote_pre(DECL_ARGS) case (MDOC_So): /* FALLTHROUGH */ case (MDOC_Sq): - term_word(p, "`"); + term_word(p, "\\(oq"); break; default: abort(); @@ -1991,7 +1991,7 @@ termp_quote_post(DECL_ARGS) case (MDOC_Do): /* FALLTHROUGH */ case (MDOC_Dq): - term_word(p, "''"); + term_word(p, "\\(rq"); break; case (MDOC_Eo): break; @@ -2012,7 +2012,7 @@ termp_quote_post(DECL_ARGS) case (MDOC_So): /* FALLTHROUGH */ case (MDOC_Sq): - term_word(p, "'"); + term_word(p, "\\(cq"); break; default: abort(); |