diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-07 20:30:40 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-07 20:30:40 +0000 |
commit | 4c98151b506dab24c773ccfb5eb5d34f3ede915d (patch) | |
tree | 45c0ba3d2595578c94f77b0979b8d93d2c1c35bb /mdoc.c | |
parent | 38e5c73900c5e957ce2d1e4eec4c1222509aac9a (diff) | |
download | mandoc-4c98151b506dab24c773ccfb5eb5d34f3ede915d.tar.gz |
Make "new sentence, new line" detection stricter:
Also catch cases where the new sentence starts with a one-letter word
and the input line is broken right after that word.
Suggested by Thomas Klausner <wiz @ NetBSD>.
It's merely a three-bit diff, changing one byte from 0x34 to 0x33,
so what can possibly go wrong...
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -278,7 +278,7 @@ mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs) for (c = buf + offs; c != NULL; c = strchr(c + 1, '.')) { if (c - buf < offs + 2) continue; - if (end - c < 4) + if (end - c < 3) break; if (isalpha((unsigned char)c[-2]) && isalpha((unsigned char)c[-1]) && |