diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-15 23:39:40 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-12-15 23:39:40 +0000 |
commit | 7aa6a9a39d16b4098093e9ce72a8b4c914a174a7 (patch) | |
tree | 617814a1e61bb939e9ae01e0d093e4f481d2d95f /mdoc.c | |
parent | 017442d6e6ebefe712db5f1122c259fdd7c3e7c5 (diff) | |
download | mandoc-7aa6a9a39d16b4098093e9ce72a8b4c914a174a7.tar.gz mandoc-7aa6a9a39d16b4098093e9ce72a8b4c914a174a7.tar.zst mandoc-7aa6a9a39d16b4098093e9ce72a8b4c914a174a7.zip |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.168 2010/12/06 11:01:19 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.169 2010/12/15 23:39:40 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -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. */ |