Custom writer: Pass attributes parameter to CaptionedImage.

Closes #2697.
This commit is contained in:
John MacFarlane 2016-02-05 16:49:27 -08:00
parent 6cb4991f6b
commit a692bd2872
2 changed files with 3 additions and 3 deletions

View file

@ -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>'

View file

@ -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