diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-18 21:18:19 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-18 21:18:19 +0000 |
commit | b9805b21686844285a66e361542127622df77b54 (patch) | |
tree | c806fea95c0bbe64f2bd916e8b1d47cd52819787 /term.c | |
parent | c0cf1cf97e8172e517a1ef4d489d8479b588fe02 (diff) | |
download | mandoc-b9805b21686844285a66e361542127622df77b54.tar.gz |
fix a regression introduced in 1.11.7:
even a breakable hyphen may be bold or underlined
ok kristaps@
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -576,13 +576,16 @@ encode(struct termp *p, const char *word, size_t sz) adjbuf(p, p->col + 1 + (len * 3)); for (i = 0; i < len; i++) { - if ( ! isgraph((unsigned char)word[i])) { + if (ASCII_HYPH != word[i] && + ! isgraph((unsigned char)word[i])) { p->buf[p->col++] = word[i]; continue; } if (TERMFONT_UNDER == f) p->buf[p->col++] = '_'; + else if (ASCII_HYPH == word[i]) + p->buf[p->col++] = '-'; else p->buf[p->col++] = word[i]; |