=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.116 retrieving revision 1.118 diff -u -p -r1.116 -r1.118 --- mandoc/mdoc_macro.c 2012/05/27 17:39:28 1.116 +++ mandoc/mdoc_macro.c 2012/11/16 13:40:36 1.118 @@ -1,7 +1,7 @@ -/* $Id: mdoc_macro.c,v 1.116 2012/05/27 17:39:28 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.118 2012/11/16 13:40:36 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010 Ingo Schwarze + * Copyright (c) 2010, 2012 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 @@ -738,7 +738,7 @@ blk_exp_close(MACRO_PROT_ARGS) if (later && MDOC_EXPLICIT & mdoc_macros[later->tok].flags) continue; - if (MDOC_CALLABLE & mdoc_macros[n->tok].flags) + if (MDOC_It != n->tok) later = n; } @@ -1358,6 +1358,13 @@ blk_part_imp(MACRO_PROT_ARGS) if (n && ! rew_sub(MDOC_BLOCK, m, tok, line, ppos)) return(0); + + /* Move trailing .Ns out of scope. */ + + for (n = body->child; n && n->next; n = n->next) + /* Do nothing. */ ; + if (n && MDOC_Ns == n->tok) + mdoc_node_relink(m, n); return(1); }