source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: get rid of rew_sub() in blk_part_imp(); no functional change
@ 2015-02-01 23:57 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-02-01 23:57 UTC (permalink / raw)
  To: source

Log Message:
-----------
get rid of rew_sub() in blk_part_imp(); no functional change

Modified Files:
--------------
    mdocml:
        mdoc_macro.c

Revision Data
-------------
Index: mdoc_macro.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_macro.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.163 -r1.164
--- mdoc_macro.c
+++ 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. */
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-01 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-01 23:57 mdocml: get rid of rew_sub() in blk_part_imp(); no functional change schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).