Skip to content

Commit

Permalink
Merge pull request #16 from moppius/pr/img-class-tag
Browse files Browse the repository at this point in the history
Don't add an empty class tag if there's no class specified on the image
  • Loading branch information
justint authored Jul 28, 2023
2 parents 4a3fb1c + c94197b commit 6cc6438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/shortcodes/img.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
{% endif %}
{% endif %}
<figure {% if extended_width_pct %}class="extended-figure"{% endif %}>
<img src="{% if resize %}{{ resized_image.url }}{% else %}{{ path }}{% endif %}" class="{% if class %}{{class}}{% endif %}" {% if alt %}alt="{{alt}}"{% endif %}/>
<img src="{% if resize %}{{ resized_image.url }}{% else %}{{ path }}{% endif %}" {% if class %}class="{{class}}"{% endif %} {% if alt %}alt="{{alt}}"{% endif %}/>
{% if caption %}<figcaption>{{ caption | safe }}</figcaption>{% endif %}
</figure>

0 comments on commit 6cc6438

Please sign in to comment.