Fix for full image spoiling (#11)

Sets the correct `class` for hiding images.
This commit is contained in:
SomewhatDamaged 2019-12-27 02:03:45 +11:00 committed by liamwhite
parent 689ce5cd5a
commit e23cb11b6e

View file

@ -240,7 +240,7 @@ defmodule FastTextile.Parser do
defp bracketed_image(parser, [{:bracketed_image, img} | r_tokens], _state) do defp bracketed_image(parser, [{:bracketed_image, img} | r_tokens], _state) do
src = escape(parser.image_transform.(img)) src = escape(parser.image_transform.(img))
{:ok, [{:markup, "<span class=\"imagespoiler\"><img src=\""}, {:markup, src}, {:markup, "\"/></span>"}], r_tokens} {:ok, [{:markup, "<span class=\"imgspoiler\"><img src=\""}, {:markup, src}, {:markup, "\"/></span>"}], r_tokens}
end end
defp bracketed_image(_parser, _tokens, _state), do: {:error, "Expected a bracketed image"} defp bracketed_image(_parser, _tokens, _state), do: {:error, "Expected a bracketed image"}