From 1a8af5fc442287ef2f7775c4de179e4520487a4f Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 19 Nov 2016 01:17:04 +0100 Subject: Org reader: Ensure images in paragraphs are not parsed as figures This fixes a regression introduced in 7e5220b57c5a48fabe6e43ba270db812593d3463. --- tests/Tests/Readers/Org.hs | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'tests/Tests/Readers') diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 882701644..6b07784b7 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -188,19 +188,29 @@ tests = "=is_subst = True=" =?> para (code "is_subst = True") - , "Image" =: - "[[./sunset.jpg]]" =?> - (para $ image "./sunset.jpg" "" "") - - , "Image with explicit file: prefix" =: - "[[file:sunrise.jpg]]" =?> - (para $ image "sunrise.jpg" "" "") + , testGroup "Images" + [ "Image" =: + "[[./sunset.jpg]]" =?> + (para $ image "./sunset.jpg" "" "") + + , "Image with explicit file: prefix" =: + "[[file:sunrise.jpg]]" =?> + (para $ image "sunrise.jpg" "" "") + + , "Multiple images within a paragraph" =: + unlines [ "[[file:sunrise.jpg]]" + , "[[file:sunset.jpg]]" + ] =?> + (para $ (image "sunrise.jpg" "" "") + <> softbreak + <> (image "sunset.jpg" "" "")) - , "Image with html attributes" =: - unlines [ "#+ATTR_HTML: :width 50%" - , "[[file:guinea-pig.gif]]" - ] =?> - (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "") + , "Image with html attributes" =: + unlines [ "#+ATTR_HTML: :width 50%" + , "[[file:guinea-pig.gif]]" + ] =?> + (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "") + ] , "Explicit link" =: "[[http://zeitlens.com/][pseudo-random /nonsense/]]" =?> -- cgit v1.2.3