git.iko.soy/typeable/pandoc
on master help sign in
Allow '-' in filenames for custom lua writers.
a1ad5bbJohn MacFarlane
src/Text/Pandoc/App/OutputSettings.hs+3−2
@@ -91,8 +91,9 @@ optToOutputSettings opts = do
91 return (formatFromFilePaths "html" [outputFile], Nothing)
91 return (formatFromFilePaths "html" [outputFile], Nothing)
92 Just f -> return (f, Nothing)
92 Just f -> return (f, Nothing)
93
93
94+ let format = if ".lua" `isSuffixOf` writerName
95+ then writerName
94− let format = map toLower $ baseWriterName
96+ else map toLower $ baseWriterName writerName
95− $ takeFileName writerName -- in case path to lua script
96
97
97 (writer, writerExts) <-
98 (writer, writerExts) <-
98 if ".lua" `isSuffixOf` format
99 if ".lua" `isSuffixOf` format