aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-11-19 13:29:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-11-19 13:29:47 +0000
commit5da67534c5777aac6e1883b298c6ac08253ed57d (patch)
tree6adb792cdbc2d73cb36a2ea52fc373c8bdff2d71 /mdoc_validate.c
parent61fa449ae914b81400ee77944d25edbdba24e9ce (diff)
downloadmandoc-5da67534c5777aac6e1883b298c6ac08253ed57d.tar.gz
mandoc-5da67534c5777aac6e1883b298c6ac08253ed57d.tar.zst
mandoc-5da67534c5777aac6e1883b298c6ac08253ed57d.zip
Improve misleading comment:
* Not sure there were any text nodes, might have been other stuff instead. * Not sure it was just one node, maybe several were deleted. * No problem if some nodes were deleted, as long as some valid ones are left. * We do not leave early, but after cleaning out all the crap. * We are not "bailing", but we consider the block valid after cleanup.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index bdf4a745..dd38477c 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.178 2011/11/18 14:58:24 joerg Exp $ */
+/* $Id: mdoc_validate.c,v 1.179 2011/11/19 13:29:47 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -1693,7 +1693,11 @@ post_rs(POST_ARGS)
mdoc_node_delete(mdoc, nn);
}
- /* Bail out early if a plain text node is found inside .Rs. */
+ /*
+ * Nothing to sort if only invalid nodes were found
+ * inside the `Rs' body.
+ */
+
if (NULL == mdoc->last->child)
return(1);