git.iko.soy/typeable/pandoc
on master help sign in
markdown2pdf: Fixed bug with output file extensions.

Previously 'markdown2pdf test.txt -o test.en.pdf' would produce 'test.pdf', not 'test.en.pdf'. Thanks to Paolo Tanimoto for the fix.

commit8e81437fd1ad7e2fab200af722c86b2b265af818 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 4 Feb 2011, 11:27 (16 years ago) parentd4b71a6
1 file changed+1−1
src/markdown2pdf.hs+1−1
src/markdown2pdf.hs+1−1
@@ -37,7 +37,7 @@ parsePandocArgs args = do
3737
3838runPandoc :: [String] -> FilePath -> IO (Either String FilePath)
3939runPandoc inputsAndArgs output = do
40− let texFile = replaceExtension output "tex"
40+ let texFile = addExtension output "tex"
4141 result <- run "pandoc" $
4242 ["-s", "--no-wrap", "-r", "markdown", "-w", "latex"]
4343 ++ inputsAndArgs ++ ["-o", texFile]