diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-07 14:04:08 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-07 14:04:08 +0000 |
commit | 029687108c2a7a7bfad17ba05b13e003b6170b7e (patch) | |
tree | 16d68f31137e6592f13a6b60b5a519bd0d23ab34 /mdoc_markdown.c | |
parent | 2e1d9e80f2952398060e47e91fece447ebd4ac5c (diff) | |
download | mandoc-029687108c2a7a7bfad17ba05b13e003b6170b7e.tar.gz |
fix completely empty .Eo: no blank line wanted
Diffstat (limited to 'mdoc_markdown.c')
-rw-r--r-- | mdoc_markdown.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mdoc_markdown.c b/mdoc_markdown.c index f14d66ce..ccbd8350 100644 --- a/mdoc_markdown.c +++ b/mdoc_markdown.c @@ -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; } |