summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-15 23:39:40 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-15 23:39:40 +0000
commitc4788e9b021a0c7106d8aeb617d236222ebe19b6 (patch)
tree079a228cbab677524c865c3412275b27be4d17c1 /mdoc.c
parent170e9dcf90a5e92a66337dd469337bb728efe516 (diff)
downloadmandoc-c4788e9b021a0c7106d8aeb617d236222ebe19b6.tar.gz
Add a "last child" member of struct mdoc_node.
Remove `Pp' or `Lp' if it is the FIRST or LAST child of an `Sh' or `Sh' body. Make "skipping paragraph" be an error, not a warning, as information (an invoked macro) is ignored.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdoc.c b/mdoc.c
index 78dec88f..f14e91ec 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -552,6 +552,8 @@ mdoc_node_unlink(struct mdoc *m, struct mdoc_node *n)
n->parent->nchild--;
if (n->parent->child == n)
n->parent->child = n->prev ? n->prev : n->next;
+ if (n->parent->last == n)
+ n->parent->last = n->prev ? n->prev : NULL;
}
/* Adjust parse point, if applicable. */