From 4a3b3b1ac6b8dc0770fd1bbebb297c160d6ee57b Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 6 Nov 2021 17:57:10 +0100 Subject: Lua: add Pushable instance for ReaderOptions --- src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs b/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs index b19c209e8..91eb22ae9 100644 --- a/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs +++ b/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs @@ -109,7 +109,7 @@ readerOptionsMembers = -- | Retrieves a 'ReaderOptions' object from a table on the stack, using -- the default values for all missing fields. -- --- Internally, this push the defaults reader options, sets each +-- Internally, this pushes the default reader options, sets each -- key/value pair of the table in the userdata value, then retrieves the -- object again. This will update all fields and complain about unknown -- keys. @@ -128,3 +128,6 @@ peekReaderOptionsTable idx = retrieving "ReaderOptions (table)" $ do pushnil -- first key setFields peekUD typeReaderOptions top + +instance Pushable ReaderOptions where + push = pushReaderOptions -- cgit v1.2.3