diff options
author | 2011-09-19 07:53:54 +0000 | |
---|---|---|
committer | 2011-09-19 07:53:54 +0000 | |
commit | d724826eccb1c8a1803a877ed6831e66af9a559c (patch) | |
tree | f10e60d6c0c29b5fd46019cebc6e534e88bfa9ee | |
parent | DESKTOP_FILES -> MODGNOME_DESKTOP_FILE. (diff) | |
download | wireguard-openbsd-d724826eccb1c8a1803a877ed6831e66af9a559c.tar.xz wireguard-openbsd-d724826eccb1c8a1803a877ed6831e66af9a559c.zip |
Breaking the line at a hyphen is only allowed if the hyphen
is both preceded and followed by an alphabetic character.
This fixes about a dozen places in base.
-rw-r--r-- | usr.bin/mandoc/roff.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index d79c70242ba..b9e04fc4bfb 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.43 2011/09/18 23:26:18 schwarze Exp $ */ +/* $Id: roff.c,v 1.44 2011/09/19 07:53:54 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -552,7 +552,6 @@ again: static enum rofferr roff_parsetext(char *p) { - char l, r; size_t sz; const char *start; enum mandoc_esc esc; @@ -579,14 +578,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++; } |