=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.197 retrieving revision 1.199 diff -u -p -r1.197 -r1.199 --- mandoc/term.c 2011/05/24 21:31:23 1.197 +++ mandoc/term.c 2011/09/18 21:18:19 1.199 @@ -1,6 +1,6 @@ -/* $Id: term.c,v 1.197 2011/05/24 21:31:23 kristaps Exp $ */ +/* $Id: term.c,v 1.199 2011/09/18 21:18:19 schwarze Exp $ */ /* - * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons + * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any @@ -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];