diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-07 14:03:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-03-07 14:03:57 +0000 |
commit | 68d50de91c350fe5f49a5450cc294c082339a963 (patch) | |
tree | 51cc580c4efa30267408868b2308417c20ac088e /usr.bin | |
parent | 50c178cde2a89c1a07f4d2403180f00f41fd811d (diff) |
fix completely empty .Eo: no blank line wanted
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mdoc_markdown.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/mandoc/mdoc_markdown.c b/usr.bin/mandoc/mdoc_markdown.c index 8037169aef9..96b75a47c2b 100644 --- a/usr.bin/mandoc/mdoc_markdown.c +++ b/usr.bin/mandoc/mdoc_markdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_markdown.c,v 1.6 2017/03/07 13:27:58 schwarze Exp $ */ +/* $OpenBSD: mdoc_markdown.c,v 1.7 2017/03/07 14:03:56 schwarze Exp $ */ /* * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> * @@ -957,21 +957,17 @@ md_pre_Eo(struct roff_node *n) static void md_post_Eo(struct roff_node *n) { - int body, tail; - if (n->end != ENDBODY_NOT) { outflags |= MD_spc; return; } - body = n->child != NULL || n->parent->head->child != NULL; - tail = n->parent->tail != NULL && n->parent->tail->child != NULL; + if (n->child == NULL && n->parent->head->child == NULL) + return; - if (body && tail) + if (n->parent->tail != NULL && n->parent->tail->child != NULL) outflags &= ~MD_spc; - else if ( ! (body || tail)) - md_preword(); - else if ( ! tail) + else outflags |= MD_spc; } |