Skip to content

Commit

Permalink
WEB-6548: Checks whether we care for widths before we show an ugly error
Browse files Browse the repository at this point in the history
  • Loading branch information
jellodiil committed Oct 12, 2023
1 parent 4a3efbd commit eb6fb6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/renderer/rw_markdown_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def image(node) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics
alt_text = node.each.select { |child| child.type == :text }.map { |child| escape_html(child.string_content) }.join(' ')
classes = class_list(alt_text)

if width_class?(alt_text)
if width_class?(alt_text) || @image_provider.width_required == false
out('<figure title="', title, '"', ' class="', classes, '">')
out(' <picture>')
if svg?(alt_text, node.url)
Expand Down

0 comments on commit eb6fb6e

Please sign in to comment.