=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.160 retrieving revision 1.162 diff -u -p -r1.160 -r1.162 --- mandoc/mdoc_macro.c 2014/12/20 02:26:57 1.160 +++ mandoc/mdoc_macro.c 2015/02/01 16:47:39 1.162 @@ -1,7 +1,7 @@ -/* $Id: mdoc_macro.c,v 1.160 2014/12/20 02:26:57 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.162 2015/02/01 16:47:39 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze + * Copyright (c) 2010, 2012-2015 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -363,7 +363,7 @@ rew_dohalt(enum mdoct tok, enum mdoc_type type, * When starting to rewind, skip plain text * and nodes that have already been rewound. */ - if (MDOC_TEXT == p->type || MDOC_VALID & p->flags) + if (p->type == MDOC_TEXT || p->flags & (MDOC_VALID | MDOC_BREAK)) return(REWIND_MORE); /* @@ -746,7 +746,7 @@ blk_exp_close(MACRO_PROT_ARGS) atok = rew_alt(tok); body = endbody = later = NULL; for (n = mdoc->last; n; n = n->parent) { - if (n->flags & MDOC_VALID) + if (n->flags & (MDOC_VALID | MDOC_BREAK)) continue; /* Remember the start of our own body. */ @@ -1137,7 +1137,7 @@ blk_full(MACRO_PROT_ARGS) if (tok == MDOC_Nd) { head = mdoc_head_alloc(mdoc, line, ppos, tok); - rew_sub(MDOC_HEAD, mdoc, tok, line, ppos); + rew_last(mdoc, head); body = mdoc_body_alloc(mdoc, line, ppos, tok); } @@ -1274,8 +1274,7 @@ blk_part_imp(MACRO_PROT_ARGS) */ blk = mdoc_block_alloc(mdoc, line, ppos, tok, NULL); - mdoc_head_alloc(mdoc, line, ppos, tok); - rew_sub(MDOC_HEAD, mdoc, tok, line, ppos); + rew_last(mdoc, mdoc_head_alloc(mdoc, line, ppos, tok)); /* * Open the body scope "on-demand", that is, after we've