summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/html/html-layout.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 3bb1789c..3d34be59 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -920,7 +920,14 @@ static fz_html_flow *find_list_mark_anchor(fz_context *ctx, fz_html *box)
while (box)
{
if (box->type == BOX_FLOW)
- return box->flow_head;
+ {
+ fz_html_flow *flow = box->flow_head;
+ if (flow->type == FLOW_BREAK)
+ flow = flow->next;
+ while (flow && flow->type == FLOW_GLUE)
+ flow = flow->next;
+ return flow;
+ }
box = box->down;
}
return NULL;