diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2016-05-18 23:24:22 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2016-05-19 09:55:12 +0200 |
commit | 16e233475ae93d7113ef049dec272d23667fc493 (patch) | |
tree | a7a3ea49647ffe17693018c36ba68ed5b7e1676f /tests/Tests/Readers | |
parent | 26e8d98be207fcee24375e8636f7861679c95406 (diff) | |
download | pandoc-16e233475ae93d7113ef049dec272d23667fc493.tar.gz |
Org reader: add support for ATTR_HTML attributes
Arbitrary key-value pairs can be added to some block types using a
`#+ATTR_HTML` line before the block. Emacs Org-mode only includes these
when exporting to HTML, but since we cannot make this distinction here,
the attributes are always added.
The functionality is now supported for figures.
This closes #1906.
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index fa0c57f71..666d93a51 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -667,6 +667,17 @@ tests = para (image "the-red-queen.jpg" "fig:redqueen" "Used as a metapher in evolutionary biology.") + , "Figure with HTML attributes" =: + unlines [ "#+CAPTION: mah brain just explodid" + , "#+NAME: lambdacat" + , "#+ATTR_HTML: :style color: blue :role button" + , "[[lambdacat.jpg]]" + ] =?> + let kv = [("style", "color: blue"), ("role", "button")] + name = "fig:lambdacat" + caption = "mah brain just explodid" + in para (imageWith (mempty, mempty, kv) "lambdacat.jpg" name caption) + , "Footnote" =: unlines [ "A footnote[1]" , "" |