aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-11-06 17:57:10 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-11-06 17:58:44 +0100
commit4a3b3b1ac6b8dc0770fd1bbebb297c160d6ee57b (patch)
tree07256203fb32e6772ca5cdd2d89560248fe97abc
parent6b462e59332242c18ea38a721ae672b88f33d621 (diff)
downloadpandoc-4a3b3b1ac6b8dc0770fd1bbebb297c160d6ee57b.tar.gz
Lua: add Pushable instance for ReaderOptions
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs5
1 files changed, 4 insertions, 1 deletions
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