diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-21 13:34:13 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-21 13:34:13 +0000 |
commit | e78cf0fc5c1dd2d9cd4f38fa5284b501006d9fd0 (patch) | |
tree | ce2342a31e8914c1126761e96ce598bde2f57deb /mdoc_term.c | |
parent | ee8726d2e6ca41905cd02fd38610926c7f8aed6d (diff) | |
download | mandoc-e78cf0fc5c1dd2d9cd4f38fa5284b501006d9fd0.tar.gz |
Bringing spacing more in line with groff, patches from schwarze@openbsd.org. Pre-testing.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index cb48117b..08acbf1e 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -812,18 +812,22 @@ termp_it_pre(DECL_ARGS) * while diagonal bodies need two. */ + p->flags |= TERMP_NOSPACE; + switch (type) { + case (MDOC_Diag): + term_word(p, "\\ \\ "); + break; case (MDOC_Inset): if (MDOC_BODY == node->type) - p->flags &= ~TERMP_NOSPACE; - else - p->flags |= TERMP_NOSPACE; + term_word(p, "\\ "); break; default: - p->flags |= TERMP_NOSPACE; break; } + p->flags |= TERMP_NOSPACE; + /* * Style flags. Diagnostic heads need TTYPE_DIAG. */ @@ -869,7 +873,7 @@ termp_it_pre(DECL_ARGS) break; case (MDOC_Tag): if (MDOC_HEAD == node->type) - p->flags |= TERMP_NOBREAK; + p->flags |= TERMP_NOBREAK | TERMP_TWOSPACE; else p->flags |= TERMP_NOLPAD; @@ -1009,9 +1013,6 @@ termp_it_post(DECL_ARGS) assert(-1 != type); switch (type) { - case (MDOC_Diag): - term_word(p, "\\ "); - /* FALLTHROUGH */ case (MDOC_Item): /* FALLTHROUGH */ case (MDOC_Inset): |