Skip to content

Commit

Permalink
_includes/figure: Replace remove:<p> with strip_html, fix #4841
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed May 14, 2024
1 parent 536e89d commit 4efb863
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Bug Fixes

- Figure helper breaks when using code markup in caption. [#4841](https://github.com/mmistakes/minimal-mistakes/issues/4841)

## [4.26.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.1)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion _includes/figure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<figure class="{{ include.class }}">
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup" title="{% if include.caption %}{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}{% endif %}">{%- endif -%}
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup"{% if include.caption %} title="{{ include.caption | markdownify | strip_html }}"{% endif %}>{%- endif -%}
<img src="{{ include.image_path | relative_url }}"
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
{%- if include.popup -%}</a>{%- endif -%}
Expand Down
8 changes: 7 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permalink: "/docs/history/"
excerpt: Change log of enhancements and bug fixes made to the theme.
sidebar:
nav: docs
last_modified_at: '2024-05-10T18:00:47+08:00'
last_modified_at: '2024-05-15T00:46:38+08:00'
toc: false
---

Expand All @@ -15,6 +15,12 @@ toc: false
-->

{% raw %}
## Unreleased

### Bug Fixes

- Figure helper breaks when using code markup in caption. [#4841](https://github.com/mmistakes/minimal-mistakes/issues/4841)

## [4.26.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.1)

### Bug Fixes
Expand Down

0 comments on commit 4efb863

Please sign in to comment.