git.iko.soy/typeable/pandoc
on master help sign in
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

commit44382a2e41b8b60594df0d8b64cf48feb346f8c9 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 1 Aug 2008, 21:42 (18 years ago) parent0362298
2 files changed+4−3
Text/Pandoc/ASCIIMathML.hs+3−2 Text/Pandoc/ODT.hs+1−1
Text/Pandoc/ASCIIMathML.hs+3−2
@@ -3,9 +3,10 @@
33-- (See <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>.)
44module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where
55import Text.Pandoc.Shared ( contentsOf )
6+import System.FilePath ( (</>) )
67
78-- | String containing ASCIIMathML javascript.
89asciiMathMLScript :: String
910asciiMathMLScript = "<script type=\"text/javascript\">\n" ++
10− $(contentsOf $ "data/ASCIIMathML.js.comment") ++
11− $(contentsOf $ "data/ASCIIMathML.js.packed") ++ "</script>\n"
11+ $(contentsOf $ "data" </> "ASCIIMathML.js.comment") ++
12+ $(contentsOf $ "data" </> "ASCIIMathML.js.packed") ++ "</script>\n"
Text/Pandoc/ODT.hs+1−1
@@ -62,7 +62,7 @@ saveOpenDocumentAsODT destinationODTPath sourceDirRelative xml = do
6262 withTempDir "pandoc-odt" $ \tempDir -> do
6363 let tempODT = tempDir </> "reference.odt"
6464 copyFile "odt-styles/reference.odt" tempODT
65− B.writeFile tempODT $ B.pack $(contentsOf "odt-styles/reference.odt")
65+ B.writeFile tempODT $ B.pack $(contentsOf $ "odt-styles" </> "reference.odt")
6666 createDirectory $ tempDir </> "Pictures"
6767 xml' <- handlePictures tempODT sourceDirRelative xml
6868 writeFile (tempDir </> "content.xml") xml'