=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.127 retrieving revision 1.129 diff -u -p -r1.127 -r1.129 --- mandoc/mdoc.c 2010/05/08 10:25:27 1.127 +++ mandoc/mdoc.c 2010/05/12 17:08:03 1.129 @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.127 2010/05/08 10:25:27 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.129 2010/05/12 17:08:03 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -689,7 +689,21 @@ mdoc_ptext(struct mdoc *m, int line, char *buf) /* Allocate the whole word. */ - return(mdoc_word_alloc(m, line, 0, buf)); + if ( ! mdoc_word_alloc(m, line, 0, buf)) + return(0); + + /* + * End-of-sentence check. If the last character is an unescaped + * EOS character, then flag the node as being the end of a + * sentence. The front-end will know how to interpret this. + */ + + assert(i); + + if (mandoc_eos(buf, (size_t)i)) + m->last->flags |= MDOC_EOS; + + return(1); }