git.iko.soy/typeable/pandoc
on master help sign in
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.

commit1d9742bb5dd976d478db877c48d9ba005ce98098 authorAlbert Krewinkel <albert@zeitkraut.de> dateFri 14 Apr 2017, 14:59 (10 years ago) parent932e395
1 file changed+2−2
src/Text/Pandoc/Lua/StackInstances.hs+2−2
src/Text/Pandoc/Lua/StackInstances.hs+2−2
@@ -65,11 +65,11 @@ instance StackValue Meta where
6565instance StackValue MetaValue where
6666 push lua = \case
6767 MetaBlocks blcks -> pushViaConstructor lua "MetaBlocks" blcks
68− MetaBool b -> pushViaConstructor lua "MetaBool" b
68+ MetaBool bool -> push lua bool
6969 MetaInlines inlns -> pushViaConstructor lua "MetaInlines" inlns
7070 MetaList metalist -> pushViaConstructor lua "MetaList" metalist
7171 MetaMap metamap -> pushViaConstructor lua "MetaMap" metamap
72− MetaString cs -> pushViaConstructor lua "MetaString" cs
72+ MetaString str -> push lua str
7373 peek lua idx = do
7474 luatype <- ltype lua idx
7575 case luatype of