]> git.cameronkatri.com Git - mandoc.git/commitdiff
Fixed new partial-imp closure (wasn't action-ing closed scopes).
authorKristaps Dzonsons <kristaps@bsd.lv>
Sat, 21 Mar 2009 09:30:52 +0000 (09:30 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Sat, 21 Mar 2009 09:30:52 +0000 (09:30 +0000)
macro.c

diff --git a/macro.c b/macro.c
index 9c15e863c5854931c93f0b4ea6143a95da0d3c7b..0c0259f9143395bccd780fb7a2e6e11985def218 100644 (file)
--- a/macro.c
+++ b/macro.c
@@ -1,4 +1,4 @@
-/* $Id: macro.c,v 1.74 2009/03/21 09:20:15 kristaps Exp $ */
+/* $Id: macro.c,v 1.75 2009/03/21 09:30:52 kristaps Exp $ */
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
  *
@@ -1057,19 +1057,15 @@ blk_part_imp(MACRO_PROT_ARGS)
                if (body == n)
                        break;
 
-       if (n) {
-               mdoc->last = body;
-               mdoc->next = MDOC_NEXT_SIBLING;
-       } 
+       if (n && ! rew_last(mdoc, body))
+               return(0);
 
        if (1 == ppos && ! append_delims(mdoc, line, pos, buf))
                return(0);
 
-       if (n) {
-               mdoc->last = mdoc->last->parent;
-               assert(mdoc->last == blk);
-               mdoc->next = MDOC_NEXT_SIBLING;
-       }
+       if (n && ! rew_last(mdoc, blk))
+               return(0);
+
        return(1);
 }