summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-04-02 21:08:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-04-14 00:31:39 -0500
commit4fa2a947590f78160dac3197672e475f433f0e4f (patch)
tree658c4e6ec08ce1cf3dc4217d61dd1fb6c75cb656 /pandoc.hs
parentdede39452f9488002daa1b402eed8d25aa88994f (diff)
Added `Text.Pandoc.Writers.Custom`, `--print-custom-lua-writer`.
pandoc -t data/sample.lua will load the script sample.lua and use it as a custom writer. data/sample.lua is provided as an example. Added `--print-custom-lua-writer` option to print the sample script.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 7608ad017..1836fe345 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -327,6 +327,14 @@ options =
"FORMAT")
"" -- "Print default template for FORMAT"
+ , Option "" ["print-sample-lua-writer"]
+ (NoArg
+ (\_ -> do
+ sample <- readDataFileUTF8 Nothing "sample.lua"
+ UTF8.hPutStr stdout sample
+ exitWith ExitSuccess))
+ "" -- "Print sample lua custom writer"
+
, Option "" ["no-wrap"]
(NoArg
(\opt -> return opt { optWrapText = False }))