aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-24 10:08:53 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-24 10:08:53 +0000
commit552620095793cb4451871506a6b9373d2677acd9 (patch)
tree00e99209243acde0d089d5e2a329eb20065caa3a /man_macro.c
parentaf2c97c7b003aede133aa66677d5d4c5bfc61c07 (diff)
downloadmandoc-552620095793cb4451871506a6b9373d2677acd9.tar.gz
mandoc-552620095793cb4451871506a6b9373d2677acd9.tar.zst
mandoc-552620095793cb4451871506a6b9373d2677acd9.zip
preserve .PP before .RE; effect found in audio/pms(1)
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/man_macro.c b/man_macro.c
index d876290e..ed79321f 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.94 2015/01/24 02:41:49 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.95 2015/01/24 10:08:53 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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