]> git.cameronkatri.com Git - mandoc.git/blobdiff - mdoc_html.c
Sync to OpenBSD:
[mandoc.git] / mdoc_html.c
index ba93749b549c3940aca15ea6224f557fc5851617..a7aa722d94c43e737192d8ebd7b1fb4eb0757531 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_html.c,v 1.184 2012/11/17 00:26:33 schwarze Exp $ */
+/*     $Id: mdoc_html.c,v 1.186 2013/12/24 20:45:27 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -460,14 +460,10 @@ print_mdoc_node(MDOC_ARGS)
        }
 
        if (HTML_KEEP & h->flags) {
-               if (n->prev && n->prev->line != n->line) {
+               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;
-                       }
                }
        }