source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Make the "new sentence, new line" check stricter, allowing
@ 2017-08-11 16:56 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-08-11 16:56 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@.

Modified Files:
--------------
    mandoc:
        mdoc.c

Revision Data
-------------
Index: mdoc.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc.c,v
retrieving revision 1.267
retrieving revision 1.268
diff -Lmdoc.c -Lmdoc.c -u -p -r1.267 -r1.268
--- mdoc.c
+++ mdoc.c
@@ -297,8 +297,8 @@ mdoc_ptext(struct roff_man *mdoc, int li
 		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;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-11 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 16:56 mandoc: Make the "new sentence, new line" check stricter, allowing schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).