@@ -268,7 +268,7 @@ ignoreUntil end = go
268 ignore p = const () <$> p
268 ignore p = const () <$> p
269 filler = choice [ try (ignore chr) <|> ignore str
269 filler = choice [ try (ignore chr) <|> ignore str
270 , ignore multiComment
270 , ignore multiComment
271− , ignore (markdown (\_ _ -> mzero))
271+ , ignore (markdown (\_ -> mzero))
272 , ignore anyChar
272 , ignore anyChar
274 go = choice [ Just <$> end
274 go = choice [ Just <$> end
@@ -301,15 +301,15 @@ anyUntilPos pos = go
301 True -> return []
301 True -> return []
302 False -> (:) <$> anyChar <*> go
302 False -> (:) <$> anyChar <*> go
304−markdown :: (String -> [a] -> IParser (String, [a])) -> IParser (String, [a])
304+markdown :: ([a] -> IParser (String, [a])) -> IParser (String, [a])
305−markdown interpolation = try (string "[markdown|") >> closeMarkdown "" []
305+markdown interpolation = try (string "[markdown|") >> closeMarkdown (++ "") []
307 closeMarkdown md stuff =
307 closeMarkdown md stuff =
308 choice [ do try (string "|]")
308 choice [ do try (string "|]")
309− return (md, stuff)
309+ return (md "", stuff)
310− , uncurry closeMarkdown =<< interpolation md stuff
310+ , (\(m,s) -> closeMarkdown (md . (m ++)) s) =<< interpolation stuff
311 , do c <- anyChar
311 , do c <- anyChar
312− closeMarkdown (md ++ [c]) stuff
312+ closeMarkdown (md . ([c]++)) stuff
315--str :: IParser String
315--str :: IParser String