Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix figcaption complaints #4399

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions _plugins/jekyll-figurify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def insert_image(url, alt, style, dimensions, actual_path)
#{alt}
</object>
</div>
<small><a target="_blank" href="#{url}">Open image in new tab</a></small>
)
else
%(
Expand Down Expand Up @@ -80,14 +79,13 @@ def figurify(page, site)
image = insert_image(url, alt, style, dimensions, actual_path)

%(
<a href="#{url}" rel="noopener noreferrer">
<figure id="figure-#{num_figure}" style="max-width: 90%; margin:auto;">
#{image}
<a target="_blank" href="#{url}" rel="noopener noreferrer"><small>Open image in new tab</small></a>
<figcaption>
<span class="figcaption-prefix"><strong>#{prefix}#{num_figure}</strong>:</span> #{title}
</figcaption>
</figure>
</a>
).split("\n").map(&:strip).join
end
end
Expand Down