diff options
Diffstat (limited to 'src/Text/Pandoc/App/CommandLineOptions.hs')
-rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs index 14f665aa9..0757e77ff 100644 --- a/src/Text/Pandoc/App/CommandLineOptions.hs +++ b/src/Text/Pandoc/App/CommandLineOptions.hs @@ -794,10 +794,11 @@ options = setUserDataDir Nothing getDefaultTemplate arg case templ of - Right "" -> -- e.g. for docx, odt, json: - E.throwIO $ PandocCouldNotFindDataFileError - ("templates/default." ++ arg) - Right t -> write t + Right t + | T.null t -> -- e.g. for docx, odt, json: + E.throwIO $ PandocCouldNotFindDataFileError + ("templates/default." ++ arg) + | otherwise -> write . T.unpack $ t Left e -> E.throwIO e exitSuccess) "FORMAT") |