aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-01 21:42:22 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-01 21:42:22 +0000
commit44382a2e41b8b60594df0d8b64cf48feb346f8c9 (patch)
treeaed76c53427820386b18d8494e1dcc7ea5fa4e05 /Text/Pandoc
parent0362298500b2efb7ad3ffe23f57f025573672799 (diff)
downloadpandoc-44382a2e41b8b60594df0d8b64cf48feb346f8c9.tar.gz
Use </> with contentsOf to ensure that paths are portable.
Do not use hardcoded '/' characters! git-svn-id: https://pandoc.googlecode.com/svn/trunk@1364 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc')
-rw-r--r--Text/Pandoc/ASCIIMathML.hs5
-rw-r--r--Text/Pandoc/ODT.hs2
2 files changed, 4 insertions, 3 deletions
diff --git a/Text/Pandoc/ASCIIMathML.hs b/Text/Pandoc/ASCIIMathML.hs
index 2f634b0b0..72a1f0e19 100644
--- a/Text/Pandoc/ASCIIMathML.hs
+++ b/Text/Pandoc/ASCIIMathML.hs
@@ -3,9 +3,10 @@
-- (See <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>.)
module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where
import Text.Pandoc.Shared ( contentsOf )
+import System.FilePath ( (</>) )
-- | String containing ASCIIMathML javascript.
asciiMathMLScript :: String
asciiMathMLScript = "<script type=\"text/javascript\">\n" ++
- $(contentsOf $ "data/ASCIIMathML.js.comment") ++
- $(contentsOf $ "data/ASCIIMathML.js.packed") ++ "</script>\n"
+ $(contentsOf $ "data" </> "ASCIIMathML.js.comment") ++
+ $(contentsOf $ "data" </> "ASCIIMathML.js.packed") ++ "</script>\n"
diff --git a/Text/Pandoc/ODT.hs b/Text/Pandoc/ODT.hs
index bb49792eb..6c0cca0a9 100644
--- a/Text/Pandoc/ODT.hs
+++ b/Text/Pandoc/ODT.hs
@@ -62,7 +62,7 @@ saveOpenDocumentAsODT destinationODTPath sourceDirRelative xml = do
withTempDir "pandoc-odt" $ \tempDir -> do
let tempODT = tempDir </> "reference.odt"
copyFile "odt-styles/reference.odt" tempODT
- B.writeFile tempODT $ B.pack $(contentsOf "odt-styles/reference.odt")
+ B.writeFile tempODT $ B.pack $(contentsOf $ "odt-styles" </> "reference.odt")
createDirectory $ tempDir </> "Pictures"
xml' <- handlePictures tempODT sourceDirRelative xml
writeFile (tempDir </> "content.xml") xml'