mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 00:15:44 +00:00
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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user