Skip to content

Commit

Permalink
fix: refactoring error when the image URL contains parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Dec 7, 2022
1 parent e7426ec commit ec98f07
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions _includes/refactor-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
{% assign _attrs = _left | split: ' ' %}

{% for _attr in _attrs %}
{% assign _pair = _attr | split: '=' %}
{% assign _pair = _attr | split: '="' %}
{% if _pair.size < 2 %}
{% continue %}
{% endif %}
Expand All @@ -93,7 +93,6 @@

{% if _src %}
{% unless _src contains '://' %}

<!-- Add CDN URL -->
{% if site.img_cdn %}
{% if site.img_cdn contains '//' %}
Expand All @@ -117,7 +116,6 @@
{% endunless %}

<!-- lazy-load images <https://github.com/ApoorvSaxena/lozad.js#usage> -->

{% assign _left = _left | replace: 'src=', 'data-src=' %}
{% endif %}
Expand Down

0 comments on commit ec98f07

Please sign in to comment.