diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-08-23 20:29:42 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-08-23 20:29:42 +0000 |
commit | 12117bdb06c2ea3ee37d7508ce54c9626b3701a9 (patch) | |
tree | 5e1e9ebe993f155473fcf70dd4b88a9b58da11b3 /eqn_term.c | |
parent | 557780bebdb6f646d2fa26cb84847307fe45918b (diff) | |
download | mandoc-12117bdb06c2ea3ee37d7508ce54c9626b3701a9.tar.gz |
eliminate white space after opening and before closing punctuation
Diffstat (limited to 'eqn_term.c')
-rw-r--r-- | eqn_term.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -90,8 +90,14 @@ eqn_box(struct termp *p, const struct eqn_box *bp) if (bp->font != EQNFONT_NONE) term_fontpush(p, fontmap[(int)bp->font]); - if (bp->text != NULL) + if (bp->text != NULL) { + if (strchr("!\"'),.:;?]}", *bp->text) != NULL) + p->flags |= TERMP_NOSPACE; term_word(p, bp->text); + if (*bp->text != '\0' && strchr("\"'([{", + bp->text[strlen(bp->text) - 1]) != NULL) + p->flags |= TERMP_NOSPACE; + } /* Special box types. */ |