From 3c01eadf2c2162ef71538063e43d2f0e31dfff0a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 24 Jan 2015 10:08:53 +0000 Subject: preserve .PP before .RE; effect found in audio/pms(1) --- man_macro.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/man_macro.c b/man_macro.c index 596ea5b9..39e219dc 100644 --- a/man_macro.c +++ b/man_macro.c @@ -319,8 +319,19 @@ blk_close(MACRO_PROT_ARGS) mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse, line, ppos, man_macronames[tok]); rew_scope(MAN_BLOCK, man, MAN_PP); - } else + } else { + line = man->last->line; + ppos = man->last->pos; + ntok = man->last->tok; man_unscope(man, nn); + + /* Move a trailing paragraph behind the block. */ + + if (ntok == MAN_LP || ntok == MAN_PP || ntok == MAN_P) { + *pos = strlen(buf); + blk_imp(man, ntok, line, ppos, pos, buf); + } + } } void -- cgit