git.iko.soy/typeable/pandoc
on master help sign in
Use </> with contentsOf to ensure that paths are portable.
44382a2fiddlosopher
Text/Pandoc/ASCIIMathML.hs+3−2
@@ -3,9 +3,10 @@
3-- (See <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>.)
3-- (See <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>.)
4module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where
4module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where
5import Text.Pandoc.Shared ( contentsOf )
5import Text.Pandoc.Shared ( contentsOf )
6+import System.FilePath ( (</>) )
6
7
7-- | String containing ASCIIMathML javascript.
8-- | String containing ASCIIMathML javascript.
8asciiMathMLScript :: String
9asciiMathMLScript :: String
9asciiMathMLScript = "<script type=\"text/javascript\">\n" ++
10asciiMathMLScript = "<script type=\"text/javascript\">\n" ++
10− $(contentsOf $ "data/ASCIIMathML.js.comment") ++
11+ $(contentsOf $ "data" </> "ASCIIMathML.js.comment") ++
11− $(contentsOf $ "data/ASCIIMathML.js.packed") ++ "</script>\n"
12+ $(contentsOf $ "data" </> "ASCIIMathML.js.packed") ++ "</script>\n"
Text/Pandoc/ODT.hs+1−1
@@ -62,7 +62,7 @@ saveOpenDocumentAsODT destinationODTPath sourceDirRelative xml = do
62 withTempDir "pandoc-odt" $ \tempDir -> do
62 withTempDir "pandoc-odt" $ \tempDir -> do
63 let tempODT = tempDir </> "reference.odt"
63 let tempODT = tempDir </> "reference.odt"
64 copyFile "odt-styles/reference.odt" tempODT
64 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")
66 createDirectory $ tempDir </> "Pictures"
66 createDirectory $ tempDir </> "Pictures"
67 xml' <- handlePictures tempODT sourceDirRelative xml
67 xml' <- handlePictures tempODT sourceDirRelative xml
68 writeFile (tempDir </> "content.xml") xml'
68 writeFile (tempDir </> "content.xml") xml'