From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 12a52a9d for ; Wed, 7 Jun 2017 15:59:19 -0500 (EST) Date: Wed, 7 Jun 2017 15:59:19 -0500 (EST) Message-Id: <3623012828218328957.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Also catch "new sentence, new line" if there are three blanks X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Also catch "new sentence, new line" if there are three blanks between the sentences. Thomas Klausner says he has seen some of these, and i don't see any false positives. Modified Files: -------------- mdocml: mdoc.c Revision Data ------------- Index: mdoc.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc.c,v retrieving revision 1.265 retrieving revision 1.266 diff -Lmdoc.c -Lmdoc.c -u -p -r1.265 -r1.266 --- mdoc.c +++ mdoc.c @@ -280,12 +280,18 @@ mdoc_ptext(struct roff_man *mdoc, int li continue; if (end - c < 3) break; - if (isalpha((unsigned char)c[-2]) && - isalpha((unsigned char)c[-1]) && - c[1] == ' ' && - isupper((unsigned char)(c[2] == ' ' ? c[3] : c[2])) && - (c[-2] != 'n' || c[-1] != 'c') && - (c[-2] != 'v' || c[-1] != 's')) + if (c[1] != ' ' || + isalpha((unsigned char)c[-2]) == 0 || + isalpha((unsigned char)c[-1]) == 0 || + (c[-2] == 'n' && c[-1] == 'c') || + (c[-2] == 'v' && c[-1] == 's')) + continue; + c += 2; + if (*c == ' ') + c++; + if (*c == ' ') + c++; + if (isupper((unsigned char)(*c))) mandoc_msg(MANDOCERR_EOS, mdoc->parse, line, (int)(c - buf), NULL); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv