summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-02-04 11:27:20 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-02-04 11:27:20 -0800
commit8e81437fd1ad7e2fab200af722c86b2b265af818 (patch)
tree520f19b8d271e946db4b2bb1fde40c2f3cfc0284
parentd4b71a6423721c79852b96c4ac398dff1c7ac428 (diff)
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.
-rw-r--r--src/markdown2pdf.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs
index 4070001f1..c61aaa8cb 100644
--- a/src/markdown2pdf.hs
+++ b/src/markdown2pdf.hs
@@ -37,7 +37,7 @@ parsePandocArgs args = do
runPandoc :: [String] -> FilePath -> IO (Either String FilePath)
runPandoc inputsAndArgs output = do
- let texFile = replaceExtension output "tex"
+ let texFile = addExtension output "tex"
result <- run "pandoc" $
["-s", "--no-wrap", "-r", "markdown", "-w", "latex"]
++ inputsAndArgs ++ ["-o", texFile]