diff options
author | 2009-06-17 18:42:42 +0000 | |
---|---|---|
committer | 2009-06-17 18:42:42 +0000 | |
commit | 70d53f79864d9beb9be9af74948a30a5c02dd7dc (patch) | |
tree | 2323f07d131944262e69da3dc2a40a26e8b9b056 /mdoc_term.c | |
parent | c27ba28b5a4370a5357e932f182417180ef109bb (diff) | |
download | mandoc-70d53f79864d9beb9be9af74948a30a5c02dd7dc.tar.gz mandoc-70d53f79864d9beb9be9af74948a30a5c02dd7dc.tar.zst mandoc-70d53f79864d9beb9be9af74948a30a5c02dd7dc.zip |
Special characters, e.g. \(ae, are now correctly rendered in the current font decoration.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 5f12c5d6..2f55a2e0 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.14 2009/06/16 19:45:51 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.15 2009/06/17 18:42:42 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -714,7 +714,7 @@ termp_it_pre(DECL_ARGS) { const struct mdoc_node *bl, *n; char buf[7]; - int i, type, keys[3], vals[3]; + int i, type, keys[3], vals[3], sv; size_t width, offset; if (MDOC_BLOCK == node->type) @@ -898,17 +898,20 @@ termp_it_pre(DECL_ARGS) /* * The dash, hyphen, bullet and enum lists all have a special - * HEAD character. Print it now. + * HEAD character (temporarily bold, in some cases). */ + sv = p->flags; if (MDOC_HEAD == node->type) switch (type) { case (MDOC_Bullet): + p->flags |= TERMP_BOLD; term_word(p, "\\[bu]"); break; case (MDOC_Dash): /* FALLTHROUGH */ case (MDOC_Hyphen): + p->flags |= TERMP_BOLD; term_word(p, "\\-"); break; case (MDOC_Enum): @@ -921,6 +924,8 @@ termp_it_pre(DECL_ARGS) break; } + p->flags = sv; /* Restore saved flags. */ + /* * If we're not going to process our children, indicate so here. */ |