aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-08-11 16:56:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-08-11 16:56:21 +0000
commitbe4630737438b7afb403ff72aa126aed00c18ac9 (patch)
tree804555457941ba1583077e08db0da94146a12e2a /mdoc.c
parent0c1c47e6b7db7c6ac3208ab63be3eadda3437749 (diff)
downloadmandoc-be4630737438b7afb403ff72aa126aed00c18ac9.tar.gz
mandoc-be4630737438b7afb403ff72aa126aed00c18ac9.tar.zst
mandoc-be4630737438b7afb403ff72aa126aed00c18ac9.zip
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@.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc.c b/mdoc.c
index 7afcc5d2..71803531 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.267 2017/06/17 13:06:16 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.268 2017/08/11 16:56:21 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -297,8 +297,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;