where
import Control.Concurrent.ParallelIO (parallel)
-import qualified Data.Map as Map (lookup)
import Data.Time (getCurrentTime)
import qualified Data.ByteString.Lazy as B (ByteString, hPut)
import Data.String.Utils (split, strip)
-import qualified Data.Map as Map (Map, empty, insert)
+import qualified Data.Map as Map (Map, empty, insert, lookup)
import Data.Maybe (catMaybes, fromJust, isNothing)
import Prelude hiding (readFile)
import System.IO (Handle, hClose, hFlush)
change_src_func :: String -> String
change_src_func old_src =
case Map.lookup old_src image_map of
- -- Leave it alone if we don't have the file locally
- Nothing -> old_src
+ -- If we don't have the file, empty the src. Pandoc will crash
+ -- otherwise.
+ Nothing -> ""
Just v -> v
change_src :: (ArrowXml a) => a XmlTree XmlTree