-- Now, transfer the attribute "name" from the code block to the new
-- image block. It might gets used by the figure numbering lua filter.
-- If the figure numbering gets not used, this additional attribute
-- gets ignored as well.
if block.attributes["name"] then
imgObj.attributes["name"] = block.attributes["name"]
end
if block.attributes["style"] then
imgObj.attributes["style"] = block.attributes["style"]
end
if block.attributes["class"] then
imgObj.attributes["class"] = block.attributes["class"]
end
I made the following addition: