git.iko.soy/typeable/pandoc
on master help sign in
Removed nullBlock.

Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck.

commit35662e14a9fafcc7d4202cec75cac47b656bb53c authorJohn MacFarlane <jgm@berkeley.edu> dateThu 27 Sep 2012, 16:06 (14 years ago) parent731415a
2 files changed+1−7
src/Text/Pandoc/Parsing.hs−6 src/Text/Pandoc/Readers/Textile.hs+1−1
src/Text/Pandoc/Parsing.hs−6
@@ -48,7 +48,6 @@ module Text.Pandoc.Parsing ( (>>~),
4848 uri,
4949 withHorizDisplacement,
5050 withRaw,
51− nullBlock,
5251 escaped,
5352 characterReference,
5453 updateLastStrPos,
@@ -418,11 +417,6 @@ withRaw parser = do
418417 ls -> unlines (init ls) ++ take (c2 - 1) (last ls)
419418 return (result, raw)
420419
421−-- | Parses a character and returns 'Null' (so that the parser can move on
422−-- if it gets stuck).
423−nullBlock :: Parser [Char] st Block
424−nullBlock = anyChar >> return Null
425−
426420-- | Parses backslash, then applies character parser.
427421escaped :: Parser [Char] st Char -- ^ Parser for character to escape
428422 -> Parser [Char] st Char
src/Text/Pandoc/Readers/Textile.hs+1−1
@@ -130,7 +130,7 @@ blockParsers = [ codeBlock
130130 , rawLaTeXBlock'
131131 , maybeExplicitBlock "table" table
132132 , maybeExplicitBlock "p" para
133− , nullBlock ]
133+ ]
134134
135135-- | Any block in the order of definition of blockParsers
136136block :: Parser [Char] ParserState Block