summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index a5f3841d..c25b009c 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -459,15 +459,11 @@ print_mdoc_node(MDOC_ARGS)
break;
}
- if (HTML_KEEP & h->flags) {
- if (n->prev && n->prev->line != n->line) {
+ if (HTML_KEEP & h->flags || MDOC_SYNPRETTY & n->flags) {
+ if (n->prev ? (n->prev->lastline != n->line) :
+ (n->parent && n->parent->line != n->line)) {
h->flags &= ~HTML_KEEP;
h->flags |= HTML_PREKEEP;
- } else if (NULL == n->prev) {
- if (n->parent && n->parent->line != n->line) {
- h->flags &= ~HTML_KEEP;
- h->flags |= HTML_PREKEEP;
- }
}
}