summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-01 23:56:37 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-01 23:56:37 +0000
commit9561b9378c37d424f287ca3746c714d696279248 (patch)
tree26cbc08ce308d1e2a11317a73abc2825292d8d9d /mdoc_macro.c
parent1d29c2a24a3538a81256f8f14c5e496fb90837e6 (diff)
downloadmandoc-9561b9378c37d424f287ca3746c714d696279248.tar.gz
get rid of rew_sub() in blk_part_imp(); no functional change
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 3e27c1e7..8624ea98 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1321,10 +1321,21 @@ blk_part_imp(MACRO_PROT_ARGS)
}
}
assert(n == body);
- rew_sub(MDOC_BODY, mdoc, tok, line, ppos);
+ rew_last(mdoc, body);
if (nl)
append_delims(mdoc, line, pos, buf);
- rew_sub(MDOC_BLOCK, mdoc, tok, line, ppos);
+ rew_last(mdoc, blk);
+
+ /*
+ * The current block extends an enclosing block.
+ * Now that the current block ends, close the enclosing block, too.
+ */
+
+ while ((blk = blk->pending) != NULL) {
+ rew_last(mdoc, blk);
+ if (blk->type == MDOC_HEAD)
+ mdoc_body_alloc(mdoc, blk->line, blk->pos, blk->tok);
+ }
/* Move trailing .Ns out of scope. */