Skip to content

Commit

Permalink
Allow non-default Inline userdata objects with __toinline metamethod
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Oct 1, 2024
1 parent 8dfe25d commit a890f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Lua/Marshal/Inline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ peekInlineFuzzy :: LuaError e => Peeker e Inline
peekInlineFuzzy idx = retrieving "Inline" $ liftLua (ltype idx) >>= \case
TypeString -> Str <$!> peekText idx
TypeTable -> peekInlineMetamethod idx <|> peekInline idx
_ -> peekInline idx
_ -> peekInline idx <|> peekInlineMetamethod idx
{-# INLINABLE peekInlineFuzzy #-}

-- | Try extra-hard to return the value at the given index as a list of
Expand Down

0 comments on commit a890f3a

Please sign in to comment.