summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-08-23 21:56:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-08-23 21:56:20 +0000
commitc4b90a5dcc35ed7ec424e14554c34bddee7f4728 (patch)
treefe771a1611743082b4ad0c1f82cf22760849cd7e
parent4e5632836989cf756d334c0fdb519bb49814cb22 (diff)
downloadmandoc-c4b90a5dcc35ed7ec424e14554c34bddee7f4728.tar.gz
remove spacing after another representation of unary minus
-rw-r--r--eqn_term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/eqn_term.c b/eqn_term.c
index 159021e8..095b82a7 100644
--- a/eqn_term.c
+++ b/eqn_term.c
@@ -96,8 +96,10 @@ eqn_box(struct termp *p, const struct eqn_box *bp)
p->flags |= TERMP_NOSPACE;
term_word(p, bp->text);
if ((cp = strchr(bp->text, '\0')) > bp->text &&
- ((cp[-1] == '-' && bp->prev == NULL) ||
- strchr("\"'([{", cp[-1]) != NULL))
+ (strchr("\"'([{", cp[-1]) != NULL ||
+ (bp->prev == NULL && (cp[-1] == '-' ||
+ (cp >= bp->text + 5 &&
+ strcmp(cp - 5, "\\[mi]") == 0)))))
p->flags |= TERMP_NOSPACE;
}