From 1d9ff85b451f976b1d140f06e9eee56bc3fadf33 Mon Sep 17 00:00:00 2001 From: Brian Leung <29217594+leungbk@users.noreply.github.com> Date: Wed, 10 Jul 2019 18:35:01 -0700 Subject: RST reader: keep `name` property in `imgAttr`. (#5637) Closes #5619. --- src/Text/Pandoc/Readers/RST.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index b54f5ccbf..105d27088 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -645,7 +645,7 @@ directive' = do name = trim $ fromMaybe "" (lookup "name" fields) classes = words $ maybe "" trim (lookup "class" fields) keyvals = [(k, trim v) | (k, v) <- fields, k /= "name", k /= "class"] - imgAttr cl = ("", classes ++ alignClasses, widthAttr ++ heightAttr) + imgAttr cl = (name, classes ++ alignClasses, widthAttr ++ heightAttr) where alignClasses = words $ maybe "" trim (lookup cl fields) ++ maybe "" (\x -> "align-" ++ trim x) -- cgit v1.2.3