aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Custom.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-08-08 23:14:12 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-08-08 23:14:12 -0700
commite9de0f0e22b9b64b5684efe81d03539c3f57a71c (patch)
tree6a5f6a6ad5d4cf95f4e3ea3106a7db9c1a97b547 /src/Text/Pandoc/Writers/Custom.hs
parent99bb066bb925134b506d39c8d6694fe81337d9c1 (diff)
downloadpandoc-e9de0f0e22b9b64b5684efe81d03539c3f57a71c.tar.gz
Preliminary support for new Div and Span elements in writers.
Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
Diffstat (limited to 'src/Text/Pandoc/Writers/Custom.hs')
-rw-r--r--src/Text/Pandoc/Writers/Custom.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs
index 5c82fe0e1..c250a240e 100644
--- a/src/Text/Pandoc/Writers/Custom.hs
+++ b/src/Text/Pandoc/Writers/Custom.hs
@@ -178,6 +178,9 @@ blockToCustom lua (OrderedList (num,sty,delim) items) =
blockToCustom lua (DefinitionList items) =
callfunc lua "DefinitionList" items
+blockToCustom lua (Div attr items) =
+ callfunc lua "Div" items (attrToMap attr)
+
-- | Convert list of Pandoc block elements to Custom.
blockListToCustom :: LuaState -- ^ Options
-> [Block] -- ^ List of block elements
@@ -240,3 +243,5 @@ inlineToCustom lua (Image alt (src,tit)) =
inlineToCustom lua (Note contents) = callfunc lua "Note" contents
+inlineToCustom lua (Span attr items) =
+ callfunc lua "Span" items (attrToMap attr)