From 44382a2e41b8b60594df0d8b64cf48feb346f8c9 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 1 Aug 2008 21:42:22 +0000 Subject: 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 --- Text/Pandoc/ASCIIMathML.hs | 5 +++-- Text/Pandoc/ODT.hs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Text') 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 .) module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where import Text.Pandoc.Shared ( contentsOf ) +import System.FilePath ( () ) -- | String containing ASCIIMathML javascript. asciiMathMLScript :: String asciiMathMLScript = "\n" + $(contentsOf $ "data" "ASCIIMathML.js.comment") ++ + $(contentsOf $ "data" "ASCIIMathML.js.packed") ++ "\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' -- cgit v1.2.3