diff options
-rw-r--r-- | data/sample.lua | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Custom.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/data/sample.lua b/data/sample.lua index 0cb492392..574f378cc 100644 --- a/data/sample.lua +++ b/data/sample.lua @@ -255,7 +255,7 @@ function html_align(align) end end -function CaptionedImage(src, tit, caption) +function CaptionedImage(src, tit, caption, attr) return '<div class="figure">\n<img src="' .. escape(src,true) .. '" title="' .. escape(tit,true) .. '"/>\n' .. '<p class="caption">' .. caption .. '</p>\n</div>' diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index 9671fc05b..d69eaaa64 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -222,8 +222,8 @@ blockToCustom _ Null = return "" blockToCustom lua (Plain inlines) = callfunc lua "Plain" inlines -blockToCustom lua (Para [Image _ txt (src,tit)]) = - callfunc lua "CaptionedImage" src tit txt +blockToCustom lua (Para [Image attr txt (src,tit)]) = + callfunc lua "CaptionedImage" src tit txt (attrToMap attr) blockToCustom lua (Para inlines) = callfunc lua "Para" inlines |