From eb6fb6eeca5ede7969401f580d995ca8f94b8ade Mon Sep 17 00:00:00 2001 From: edith <58082567+jellodiil@users.noreply.github.com> Date: Fri, 13 Oct 2023 00:00:00 +0100 Subject: [PATCH] WEB-6548: Checks whether we care for widths before we show an ugly error --- app/lib/renderer/rw_markdown_renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/renderer/rw_markdown_renderer.rb b/app/lib/renderer/rw_markdown_renderer.rb index 426289f..9e147a0 100644 --- a/app/lib/renderer/rw_markdown_renderer.rb +++ b/app/lib/renderer/rw_markdown_renderer.rb @@ -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('
') out(' ') if svg?(alt_text, node.url)