Support for lua filters in pandoc-server #10677
aslakhellesoy
started this conversation in
General
Replies: 2 comments 2 replies
-
Yes, the filters need IO. See here for the relevant bit of code and a relevant comment: The changes needed to make this subject to an option may be tricky, especially for someone new to Haskell. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks for your reply @jgm - much appreciated. I'll give it a stab! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I understand that filters are not implemented in pandoc-server for security reasons.
Would it still be possible to implement, perhaps with a
--allow-filters
option to explicitly enable them?I understand that the PandocPure monad prevents any IO, but it isn't clear to me whether lua filters would require disk IO or not.
Does the Lua engine require Lua scripts to be on disk or can they be supplied as strings?
If this is possible (and wanted) I could try to provide a patch, but I would love some pointers as I am new to both Haskell and the Pandoc codebase.
FWIW, we're hosting pandoc-server in a private network behind an nginx that performs basic auth.
In other words, we could live with the security implications since we're in control over who calls the server.
Beta Was this translation helpful? Give feedback.
All reactions