=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.75 retrieving revision 1.77 diff -u -p -r1.75 -r1.77 --- mandoc/mdoc_macro.c 2010/05/31 10:28:04 1.75 +++ mandoc/mdoc_macro.c 2010/05/31 15:42:09 1.77 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.75 2010/05/31 10:28:04 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.77 2010/05/31 15:42:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -1118,7 +1118,7 @@ blk_full(MACRO_PROT_ARGS) /* If we've already opened our body, exit now. */ if (NULL != body) - return(1); + goto out; #ifdef UGLY /* @@ -1145,6 +1145,16 @@ blk_full(MACRO_PROT_ARGS) if ( ! mdoc_body_alloc(m, line, ppos, tok)) return(0); +out: + if ( ! (MDOC_FREECOL & m->flags)) + return(1); + + if ( ! rew_sub(MDOC_BODY, m, tok, line, ppos)) + return(0); + if ( ! rew_sub(MDOC_BLOCK, m, tok, line, ppos)) + return(0); + + m->flags &= ~MDOC_FREECOL; return(1); } @@ -1702,7 +1712,10 @@ phrase_ta(MACRO_PROT_ARGS) */ if (NULL == m->last || MDOC_BODY != m->last->type || - MDOC_It != m->last->tok) { + MDOC_It != m->last->tok || + NULL == m->last->parent->parent || + MDOC_Bl != m->last->parent->parent->tok || + LIST_column != m->last->parent->parent->data.list) { swarn(m, tok, line, ppos, n); return(0); }