diff options
author | Brian Leung <29217594+leungbk@users.noreply.github.com> | 2019-07-10 18:35:01 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-07-10 18:35:01 -0700 |
commit | 1d9ff85b451f976b1d140f06e9eee56bc3fadf33 (patch) | |
tree | 7cbe4f4a4bff49c05107806393826e38363d5434 /src/Text/Pandoc | |
parent | 95d7d1b908facce4887dba91748a900f264fb1f1 (diff) | |
download | pandoc-1d9ff85b451f976b1d140f06e9eee56bc3fadf33.tar.gz |
RST reader: keep `name` property in `imgAttr`. (#5637)
Closes #5619.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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) |