summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-08-11 16:55:11 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-08-11 16:55:11 +0000
commit3c97015497ad5082d586b345924b82053cb31624 (patch)
tree01d0b98cb275c8279a20f557ce168797f3b0656f
parent7c7f671cb9d670c94ca576ee723ce0a83fcc6c10 (diff)
Make the "new sentence, new line" check stricter, allowing digits
in the last two letters of the last word of the sentence. No false positives in base or Xenocara. Suggested by and OK jmc@.
-rw-r--r--usr.bin/mandoc/mdoc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index 869f4a9a91b..61bbe77cd70 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc.c,v 1.156 2017/06/17 13:05:47 schwarze Exp $ */
+/* $OpenBSD: mdoc.c,v 1.157 2017/08/11 16:55:10 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -295,8 +295,8 @@ mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs)
if (end - c < 3)
break;
if (c[1] != ' ' ||
- isalpha((unsigned char)c[-2]) == 0 ||
- isalpha((unsigned char)c[-1]) == 0 ||
+ isalnum((unsigned char)c[-2]) == 0 ||
+ isalnum((unsigned char)c[-1]) == 0 ||
(c[-2] == 'n' && c[-1] == 'c') ||
(c[-2] == 'v' && c[-1] == 's'))
continue;