Skip to content

Commit

Permalink
Faster inline tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Aug 30, 2024
1 parent e22308b commit dda6f8b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/Text/Pandoc/Lua/Marshal/Inline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,31 @@ typeInline = deftype "Inline"
(pushText, getInlineText)
(peekText, setInlineText)

, readonly "xtag" "type of Inline"
(pushText, \case
Cite{} -> "Cite"
Code{} -> "Code"
Emph{} -> "Emph"
Image{} -> "Image"
LineBreak{} -> "LineBreak"
Link{} -> "Link"
Math{} -> "Math"
Note{} -> "Note"
Quoted{} -> "Quoted"
RawInline{} -> "RawInline"
SmallCaps{} -> "SmallCaps"
SoftBreak{} -> "SoftBreak"
Space{} -> "Space"
Span{} -> "Span"
Strikeout{} -> "Strikeout"
Strong{} -> "Strong"
Str{} -> "Str"
Subscript{} -> "Subscript"
Superscript{} -> "Superscript"
Underline{} -> "Underline")

, readonly "tag" "type of Inline"
(pushString, showConstr . toConstr )
(pushString, showConstr . toConstr)

, alias "t" "tag" ["tag"]
, alias "c" "content" ["content"]
Expand Down

0 comments on commit dda6f8b

Please sign in to comment.