From 43b6cb5b51575dc023763b449678f514df3a039a Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Fri, 27 Mar 2015 17:42:25 +0000 Subject: [PATCH] Add screenshot width attr only when it's available --- app/presenters/asciicast_page_presenter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/presenters/asciicast_page_presenter.rb b/app/presenters/asciicast_page_presenter.rb index 2f86551..a045f3a 100644 --- a/app/presenters/asciicast_page_presenter.rb +++ b/app/presenters/asciicast_page_presenter.rb @@ -58,7 +58,8 @@ class AsciicastPagePresenter def embed_html_link(routes) img_src = routes.asciicast_url(asciicast, format: :png) url = routes.asciicast_url(asciicast) - %() + width = %{width="#{asciicast.image_width}"} if asciicast.image_width + %() end def embed_markdown_link(routes)