From ed6c0d919d0d7ea54c8c16895d20486f15dc304e Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 20 Apr 2020 17:40:46 -0400 Subject: [PATCH] simplify macro logic --- pygeoapi/templates/item.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pygeoapi/templates/item.html b/pygeoapi/templates/item.html index 1590922..390cac8 100644 --- a/pygeoapi/templates/item.html +++ b/pygeoapi/templates/item.html @@ -2,9 +2,7 @@ {# Optionally renders an img element, otherwise standard value or link rendering #} {% macro render_item_value(v, width) -%} {% set val = v | string | trim | lower %} - {% if val|length and - (val.endswith(".jpg") or val.endswith(".jpeg") or val.endswith(".png") or val.endswith(".gif") or val.endswith(".bmp")) - %} + {% if val|length and val.endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) %} {# Ends with image extension: render img element with link to image #} {% else %}