=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.137 retrieving revision 1.139 diff -u -p -r1.137 -r1.139 --- mandoc/mdoc.c 2010/05/24 13:39:47 1.137 +++ mandoc/mdoc.c 2010/05/26 09:35:35 1.139 @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.137 2010/05/24 13:39:47 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.139 2010/05/26 09:35:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -560,9 +560,15 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int of * Search for the beginning of unescaped trailing whitespace (ws) * and for the first character not to be output (end). */ + + /* FIXME: replace with strcspn(). */ ws = NULL; for (c = end = buf + offs; *c; c++) { switch (*c) { + case '-': + if (mandoc_hyph(buf + offs, c)) + *c = ASCII_HYPH; + break; case ' ': if (NULL == ws) ws = c;