summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-12-19 12:11:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-12-19 12:11:42 +0000
commit2a6efe74b7ef7643204cdcca305440dba3c2ae97 (patch)
tree9ebdca5af31b3d7d4bfe3405679d59e2845f8f42
parentc37f2b54f62dbf1862376e00f4479aeb668fe165 (diff)
downloadmandoc-2a6efe74b7ef7643204cdcca305440dba3c2ae97.tar.gz
Handle .Bk the same way as groff 1.20.1:
.Bk without arguments defaults to -words. .Bk with invalid arguments (including -lines) has no effect. ok kristaps@
-rw-r--r--mdoc_term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 9ee6b3bb..e83494db 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -2117,7 +2117,8 @@ termp_bk_pre(DECL_ARGS)
case (MDOC_HEAD):
return(0);
case (MDOC_BODY):
- p->flags |= TERMP_PREKEEP;
+ if (n->parent->args || 0 == n->prev->nchild)
+ p->flags |= TERMP_PREKEEP;
break;
default:
abort();