pandoc.lua: destructure attr for Link and Image
Make Attr values accessible through through the keys `identifier`, `classes` and `attributes`. This is already used in other elements with attributes and is now fixed for Link and Image.
This commit is contained in:
parent
8aa972d9df
commit
cab4f982f3
1 changed files with 2 additions and 2 deletions
|
@ -424,7 +424,7 @@ M.Image = M.Inline:create_constructor(
|
||||||
attr = attr or M.Attr()
|
attr = attr or M.Attr()
|
||||||
return {c = {attr, caption, {src, title}}}
|
return {c = {attr, caption, {src, title}}}
|
||||||
end,
|
end,
|
||||||
{"attributes", "caption", {"src", "title"}}
|
{{"identifier", "classes", "attributes"}, "caption", {"src", "title"}}
|
||||||
)
|
)
|
||||||
|
|
||||||
--- Create a LineBreak inline element
|
--- Create a LineBreak inline element
|
||||||
|
@ -449,7 +449,7 @@ M.Link = M.Inline:create_constructor(
|
||||||
attr = attr or M.Attr()
|
attr = attr or M.Attr()
|
||||||
return {c = {attr, content, {target, title}}}
|
return {c = {attr, content, {target, title}}}
|
||||||
end,
|
end,
|
||||||
{"attributes", "content", {"target", "title"}}
|
{{"identifier", "classes", "attributes"}, "content", {"target", "title"}}
|
||||||
)
|
)
|
||||||
|
|
||||||
--- Creates a Math element, either inline or displayed.
|
--- Creates a Math element, either inline or displayed.
|
||||||
|
|
Loading…
Add table
Reference in a new issue