X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/5a614b48d4e480e6aecbb9f6257de42dee05e3ae..06acc5d53500a0a7feb20e948d2a07950d0b4bad:/mdoc_validate.c?ds=sidebyside diff --git a/mdoc_validate.c b/mdoc_validate.c index 56936424..dd38477c 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.177 2011/10/16 12:20:34 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.179 2011/11/19 13:29:47 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -1693,6 +1693,14 @@ post_rs(POST_ARGS) mdoc_node_delete(mdoc, nn); } + /* + * Nothing to sort if only invalid nodes were found + * inside the `Rs' body. + */ + + if (NULL == mdoc->last->child) + return(1); + /* * The full `Rs' block needs special handling to order the * sub-elements according to `rsord'. Pick through each element