git.iko.soy/typeable/pandoc
on master help sign in
pandoc.lua: destructure attr for Link and Image
cab4f98Albert Krewinkel
data/pandoc.lua+2−2
@@ -424,7 +424,7 @@ M.Image = M.Inline:create_constructor(
424 attr = attr or M.Attr()
424 attr = attr or M.Attr()
425 return {c = {attr, caption, {src, title}}}
425 return {c = {attr, caption, {src, title}}}
426 end,
426 end,
427− {"attributes", "caption", {"src", "title"}}
427+ {{"identifier", "classes", "attributes"}, "caption", {"src", "title"}}
428)
428)
429
429
430--- Create a LineBreak inline element
430--- Create a LineBreak inline element
@@ -449,7 +449,7 @@ M.Link = M.Inline:create_constructor(
449 attr = attr or M.Attr()
449 attr = attr or M.Attr()
450 return {c = {attr, content, {target, title}}}
450 return {c = {attr, content, {target, title}}}
451 end,
451 end,
452− {"attributes", "content", {"target", "title"}}
452+ {{"identifier", "classes", "attributes"}, "content", {"target", "title"}}
453)
453)
454
454
455--- Creates a Math element, either inline or displayed.
455--- Creates a Math element, either inline or displayed.