X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/2da6c4a2249e27899c00839a6d4bc3c71011e718..9c1eaf47face65f05d12c1991f19a92789b433fc:/mdoc_validate.c diff --git a/mdoc_validate.c b/mdoc_validate.c index 783f2c78..654b344f 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.117 2010/09/27 09:26:27 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.119 2010/09/27 23:03:44 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -265,7 +265,7 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, NULL }, /* Dx */ { NULL, posts_text }, /* %Q */ { NULL, posts_notext }, /* br */ - { NULL, posts_sp }, /* sp */ + { pres_pp, posts_sp }, /* sp */ { NULL, posts_text1 }, /* %U */ { NULL, NULL }, /* Ta */ }; @@ -1473,7 +1473,12 @@ static int pre_pp(PRE_ARGS) { - if (NULL == mdoc->last || MDOC_Pp != mdoc->last->tok) + if (NULL == mdoc->last) + return(1); + + /* Don't allow prior `Lp' or `Pp'. */ + + if (MDOC_Pp != mdoc->last->tok && MDOC_Lp != mdoc->last->tok) return(1); if (MDOC_Bl == n->tok && n->data.Bl->comp)