Use lua bools and strings for MetaBool, MetaString
Native lua booleans and strings are used to represent MetaBool and MetaString values. This is more natural than the previous table-based representation. The old lua representation can still be read back to haskell, ensuring compatibility with the `pandoc.MetaBool` and `pandoc.MetaString` lua constructors.
This commit is contained in:
parent
932e395e53
commit
1d9742bb5d
1 changed files with 2 additions and 2 deletions
|
@ -65,11 +65,11 @@ instance StackValue Meta where
|
|||
instance StackValue MetaValue where
|
||||
push lua = \case
|
||||
MetaBlocks blcks -> pushViaConstructor lua "MetaBlocks" blcks
|
||||
MetaBool b -> pushViaConstructor lua "MetaBool" b
|
||||
MetaBool bool -> push lua bool
|
||||
MetaInlines inlns -> pushViaConstructor lua "MetaInlines" inlns
|
||||
MetaList metalist -> pushViaConstructor lua "MetaList" metalist
|
||||
MetaMap metamap -> pushViaConstructor lua "MetaMap" metamap
|
||||
MetaString cs -> pushViaConstructor lua "MetaString" cs
|
||||
MetaString str -> push lua str
|
||||
peek lua idx = do
|
||||
luatype <- ltype lua idx
|
||||
case luatype of
|
||||
|
|
Loading…
Reference in a new issue