From 496b1eca087490346a29c6c062c53a21e679ddd5 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 10 Feb 2021 17:42:29 +0000 Subject: layout: list handling: Scope reduce some variables in the recursive call. --- content/handlers/html/layout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c index 6d7d70f31..672084a6b 100644 --- a/content/handlers/html/layout.c +++ b/content/handlers/html/layout.c @@ -4674,14 +4674,13 @@ static void layout_lists(const html_content *content, struct box *box) { struct box *child; - struct box *marker; - plot_font_style_t fstyle; layout__ordered_list_count(box); for (child = box->children; child; child = child->next) { if (child->list_marker) { - marker = child->list_marker; + struct box *marker = child->list_marker; + if (layout__list_item_is_numerical(child)) { if (marker->text == NULL) { layout__set_numerical_marker_text( @@ -4700,6 +4699,7 @@ layout_lists(const html_content *content, struct box *box) marker->height) / 2; } else if (marker->text) { if (marker->width == UNKNOWN_WIDTH) { + plot_font_style_t fstyle; font_plot_style_from_css( &content->len_ctx, marker->style, -- cgit v1.2.3