-/* $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 <kristaps@bsd.lv>
*
{ 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 */
};
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)