Merge pull request #1888 from mpickering/errormsg
Better warning when trying to read multiple binary files
commit6e7a76c800ea52a60a7e29bd092b54be1ff79e1c
authorJohn MacFarlane <jgm@berkeley.edu>
dateSun 18 Jan 2015, 19:55 (12 years ago)
parent25e12cada93181
pandoc.hs+2−1
@@ -1255,7 +1255,8 @@ main = do
12551255 Right (bs,_) -> return $ UTF8.toString bs
12561256
12571257 let readFiles [] = error "Cannot read archive from stdin"
1258− readFiles (x:_) = B.readFile x
1258+ readFiles [x] = B.readFile x
1259+ readFiles (x:xs) = mapM (warn . ("Ignoring: " ++)) xs >> B.readFile x
12591260
12601261 let convertTabs = tabFilter (if preserveTabs || readerName' == "t2t"
12611262 then 0