mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
Lua: fix rendering of Lua errors in Lua
Otherwise the `Error running Lua` message can be prepended multiple times.
This commit is contained in:
@@ -30,7 +30,9 @@ import qualified Text.Pandoc.UTF8 as UTF8
|
||||
typePandocError :: LuaError e => DocumentedType e PandocError
|
||||
typePandocError = deftype "PandocError"
|
||||
[ operation Tostring $ defun "__tostring"
|
||||
### liftPure renderError
|
||||
### liftPure (\case
|
||||
PandocLuaError e -> e
|
||||
err -> renderError err)
|
||||
<#> udparam typePandocError "obj" "PandocError object"
|
||||
=#> functionResult pushText "string" "string representation of error."
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user