diff --git a/data/pandoc.lua b/data/pandoc.lua index 948e59776796e..7cc97c8a83d00 100644 --- a/data/pandoc.lua +++ b/data/pandoc.lua @@ -516,12 +516,12 @@ M.InlineMath = M.Inline:create_constructor( --- Creates a Note inline element -- @function Note --- @tparam "FootNote"|"EndNote" note type -- @tparam {Block,...} content note block content +-- @tparam "FootNote"|"EndNote" note type M.Note = M.Inline:create_constructor( "Note", - function(notetype, content) return {c = {notetype, List:new(content)}} end, - {"notetype", "content"} + function(content, notetype) return {c = {notetype, List:new(content)}} end, + {"content", "notetype"} ) --- Creates a Quoted inline element given the quote type and quoted content. diff --git a/src/Text/Pandoc/Lua/StackInstances.hs b/src/Text/Pandoc/Lua/StackInstances.hs index 681b52a415a5e..f08e17c7f4560 100644 --- a/src/Text/Pandoc/Lua/StackInstances.hs +++ b/src/Text/Pandoc/Lua/StackInstances.hs @@ -243,7 +243,7 @@ pushInline = \case Image attr alt (src,tit) -> pushViaConstructor "Image" alt src tit (LuaAttr attr) LineBreak -> pushViaConstructor "LineBreak" Link attr lst (src,tit) -> pushViaConstructor "Link" lst src tit (LuaAttr attr) - Note t blcks -> pushViaConstructor "Note" t blcks + Note t blcks -> pushViaConstructor "Note" blcks t Math mty str -> pushViaConstructor "Math" mty str Quoted qt inlns -> pushViaConstructor "Quoted" qt inlns RawInline f cs -> pushViaConstructor "RawInline" f cs diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index df485845326c0..4f6230eda5787 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -231,9 +231,7 @@ inlineToCustom (Link attr txt (src,tit)) = inlineToCustom (Image attr alt (src,tit)) = callFunc "Image" (Stringify alt) src tit (attrToMap attr) -inlineToCustom (Note FootNote contents) = callFunc "FootNote" (Stringify contents) - -inlineToCustom (Note EndNote contents) = callFunc "EndNote" (Stringify contents) +inlineToCustom (Note noteType contents) = callFunc "Note" (Stringify contents) noteType inlineToCustom (Span attr items) = callFunc "Span" (Stringify items) (attrToMap attr)