summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roff.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/roff.c b/roff.c
index 74401735..83b5e8b6 100644
--- a/roff.c
+++ b/roff.c
@@ -556,7 +556,6 @@ again:
static enum rofferr
roff_parsetext(char *p)
{
- char l, r;
size_t sz;
const char *start;
enum mandoc_esc esc;
@@ -583,14 +582,8 @@ roff_parsetext(char *p)
continue;
}
- l = *(p - 1);
- r = *(p + 1);
- if ('\\' != l &&
- '\t' != r && '\t' != l &&
- ' ' != r && ' ' != l &&
- '-' != r && '-' != l &&
- ! isdigit((unsigned char)l) &&
- ! isdigit((unsigned char)r))
+ if (isalpha((unsigned char)p[-1]) &&
+ isalpha((unsigned char)p[1]))
*p = ASCII_HYPH;
p++;
}