From 35662e14a9fafcc7d4202cec75cac47b656bb53c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 27 Sep 2012 16:06:29 -0700 Subject: Removed nullBlock. Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck. --- src/Text/Pandoc/Parsing.hs | 6 ------ src/Text/Pandoc/Readers/Textile.hs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index bf4519a4f..731375e38 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -48,7 +48,6 @@ module Text.Pandoc.Parsing ( (>>~), uri, withHorizDisplacement, withRaw, - nullBlock, escaped, characterReference, updateLastStrPos, @@ -418,11 +417,6 @@ withRaw parser = do ls -> unlines (init ls) ++ take (c2 - 1) (last ls) return (result, raw) --- | Parses a character and returns 'Null' (so that the parser can move on --- if it gets stuck). -nullBlock :: Parser [Char] st Block -nullBlock = anyChar >> return Null - -- | Parses backslash, then applies character parser. escaped :: Parser [Char] st Char -- ^ Parser for character to escape -> Parser [Char] st Char diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index dc95d9a56..49f20ba29 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -130,7 +130,7 @@ blockParsers = [ codeBlock , rawLaTeXBlock' , maybeExplicitBlock "table" table , maybeExplicitBlock "p" para - , nullBlock ] + ] -- | Any block in the order of definition of blockParsers block :: Parser [Char] ParserState Block -- cgit v1.2.3