From 75cba828b5c69299c3a4a1e33df8deae3a6c291e Mon Sep 17 00:00:00 2001 From: "paul.rivier" Date: Tue, 29 May 2012 13:41:28 +0200 Subject: Textile reader: fix for `` and `==`. Closes #517. --- src/Text/Pandoc/Readers/Textile.hs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index bed13a491..348900d38 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -493,19 +493,12 @@ escapedInline :: GenParser Char ParserState Inline escapedInline = escapedEqs <|> escapedTag escapedEqs :: GenParser Char ParserState Inline -escapedEqs = Str <$> (try $ surrounded (string "==") anyChar) - --- -- | literal text escaped between == ... == --- escapedEqs :: GenParser Char ParserState Inline --- escapedEqs = try $ do --- string "==" --- contents <- manyTill anyChar (try $ string "==") --- return $ Str contents +escapedEqs = Str <$> (try $ string "==" *> manyTill anyChar (try $ string "==")) -- | literal text escaped btw tags escapedTag :: GenParser Char ParserState Inline -escapedTag = try $ Str <$> - enclosed (string "") (try $ string "") anyChar +escapedTag = Str <$> + (try $ string "" *> manyTill anyChar (try $ string "")) -- | Any special symbol defined in wordBoundaries symbol :: GenParser Char ParserState Inline -- cgit v1.2.3