aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-05 00:14:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-05 00:14:13 +0000
commit4f91009f8aa8fa191505ff44484c023b578795b2 (patch)
treea8e0ab19e43df333dfe231ace1509c193ae68a95 /mdoc_html.c
parentaff7055e2d69b65767cc1314a7898f31abe2c74a (diff)
downloadmandoc-4f91009f8aa8fa191505ff44484c023b578795b2.tar.gz
mandoc-4f91009f8aa8fa191505ff44484c023b578795b2.tar.zst
mandoc-4f91009f8aa8fa191505ff44484c023b578795b2.zip
Simplify by deleting the "lastline" member of struct mdoc_node.
Minus one struct member, minus 17 lines of code, no functional change.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index bc89a4af..5b7fc742 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.221 2015/02/01 23:10:35 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.222 2015/02/05 00:14:13 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -436,12 +436,9 @@ print_mdoc_node(MDOC_ARGS)
break;
}
- if (HTML_KEEP & h->flags) {
- if (n->prev ? (n->prev->lastline != n->line) :
- (n->parent && n->parent->line != n->line)) {
- h->flags &= ~HTML_KEEP;
- h->flags |= HTML_PREKEEP;
- }
+ if (h->flags & HTML_KEEP && n->flags & MDOC_LINE) {
+ h->flags &= ~HTML_KEEP;
+ h->flags |= HTML_PREKEEP;
}
if (child && n->child)