diff options
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 |