summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-19 22:00:37 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-19 22:00:37 +0000
commita32978d2cad8df466fc1ad27d42e6aff9ce25c9b (patch)
treec714612c5e85e550a2442a25bf4b1039e2c6cb8b /mdoc_term.c
parente83d3f1920808345008b02a30870871c3f4e489d (diff)
downloadmandoc-a32978d2cad8df466fc1ad27d42e6aff9ce25c9b.tar.gz
Let .Ao and .Aq render as "<>" after .An and as "\(la\(ra" elsewhere,
just like groff; minibug noticed by bentley@.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index e513ad19..d5298d9a 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1854,7 +1854,8 @@ termp_quote_pre(DECL_ARGS)
case MDOC_Ao:
/* FALLTHROUGH */
case MDOC_Aq:
- term_word(p, "<");
+ term_word(p, n->parent->prev != NULL &&
+ n->parent->prev->tok == MDOC_An ? "<" : "\\(la");
break;
case MDOC_Bro:
/* FALLTHROUGH */
@@ -1925,7 +1926,8 @@ termp_quote_post(DECL_ARGS)
case MDOC_Ao:
/* FALLTHROUGH */
case MDOC_Aq:
- term_word(p, ">");
+ term_word(p, n->parent->prev != NULL &&
+ n->parent->prev->tok == MDOC_An ? ">" : "\\(ra");
break;
case MDOC_Bro:
/* FALLTHROUGH */