diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-24 10:08:53 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-24 10:08:53 +0000 |
commit | 3c01eadf2c2162ef71538063e43d2f0e31dfff0a (patch) | |
tree | 9c31dfa65ffb7375b4433b523a2cbe9e0a5c3e64 /man_macro.c | |
parent | 46720e11f3c6e90c1850aaeb920a5a9b9b6eb659 (diff) | |
download | mandoc-3c01eadf2c2162ef71538063e43d2f0e31dfff0a.tar.gz |
preserve .PP before .RE; effect found in audio/pms(1)
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 |