aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index cad6403e..33cfaac4 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.160 2010/06/27 16:18:13 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.161 2010/06/27 17:53:27 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -2109,8 +2109,17 @@ static int
termp_bk_pre(DECL_ARGS)
{
- p->flags |= TERMP_PREKEEP;
- return(1);
+ switch (n->type) {
+ case (MDOC_BLOCK):
+ return(1);
+ case (MDOC_HEAD):
+ return(0);
+ case (MDOC_BODY):
+ p->flags |= TERMP_PREKEEP;
+ return(1);
+ default:
+ abort();
+ }
}
@@ -2119,7 +2128,8 @@ static void
termp_bk_post(DECL_ARGS)
{
- p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
+ if (MDOC_BODY == n->type)
+ p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
}
/* ARGSUSED */