git.iko.soy/typeable/pandoc
on master help sign in
Fixed bug in withRaw.

Didn't correctly handle case where nothing is parsed.

commit26954341132fcc2b9b0e0746a198b5023ed908ee authorJohn MacFarlane <fiddlosopher@gmail.com> dateThu 13 Dec 2012, 19:01 (14 years ago) parent6e36375
1 file changed+1−1
src/Text/Pandoc/Parsing.hs+1−1
src/Text/Pandoc/Parsing.hs+1−1
@@ -412,7 +412,7 @@ withRaw parser = do
412412 let (l2,c2) = (sourceLine pos2, sourceColumn pos2)
413413 let inplines = take ((l2 - l1) + 1) $ lines inp
414414 let raw = case inplines of
415− [] -> error "raw: inplines is null" -- shouldn't happen
415+ [] -> ""
416416 [l] -> take (c2 - c1) l
417417 ls -> unlines (init ls) ++ take (c2 - 1) (last ls)
418418 return (result, raw)