diff options
| author | Albert Krewinkel <[email protected]> | 2022-10-12 11:29:45 +0200 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2022-10-12 11:35:44 +0200 |
| commit | 543cb5d45d3ebc4c5a504be42efd6febb3a9ceaa (patch) | |
| tree | 0c303df08675689a10d790934d34d1c8a3c49fde /pandoc-lua-engine/src | |
| parent | 78d7fc46febe3f2d5ebc1bea4761d115bb26f117 (diff) | |
Lua: allow Doc values in `WriterOptions.variables`.
The specialized peeker and pusher function for `Context Text` values
does not go via JSON, and thus keeps Doc values unchanged during
round-tripping.
Diffstat (limited to 'pandoc-lua-engine/src')
| -rw-r--r-- | pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs index a96c3d4b8..48451457b 100644 --- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs +++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Marshal/WriterOptions.hs @@ -21,6 +21,7 @@ module Text.Pandoc.Lua.Marshal.WriterOptions import Control.Applicative (optional) import Data.Default (def) import HsLua as Lua +import Text.Pandoc.Lua.Marshal.Context (peekContext, pushContext) import Text.Pandoc.Lua.Marshal.Format (peekExtensions, pushExtensions) import Text.Pandoc.Lua.Marshal.List (pushPandocList) import Text.Pandoc.Lua.Marshal.Template (peekTemplate, pushTemplate) @@ -206,8 +207,8 @@ typeWriterOptions = deftype "WriterOptions" , property "variables" "Variables to set in template" - (pushViaJSON, writerVariables) - (peekViaJSON, \opts x -> opts{ writerVariables = x }) + (pushContext, writerVariables) + (peekContext, \opts x -> opts{ writerVariables = x }) , property "wrap_text" "Option for wrapping text" |
