Linter error - whitespace between attributes

andylewie
New Member
5 0 0

Hi,

I am receiving errors from the linter tool (http://linter.structured-data.org/) that says "ERROR: Missing whitespace between attributes."

The missing whitespace is in my slideshow.liquid file from the Brooklyn theme, with no whitespace immediately before the s in src="...." and also immediately before the d in data-src="...."

This is the block of code causing the errors.

 

{%- assign img_url = block.settings.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
<img class="hero__image hero__image--{{ block.id }} lazyload fade-in {% unless forloop.first == true %} lazypreload {% endunless %}"
{%- if forloop.first == true -%}
src="{{ block.settings.image | img_url: '300x' }}"
{%- endif -%}
data-src="{{ img_url }}"
data-widths="[540, 720, 900, 1080, 1296, 1512, 1728, 1944, 2048, 4472]"

 

Any help is much appreciated.

Thanks, Andrew

0 Likes