summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpaul.rivier <paul.r.ml@gmail.com>2012-05-29 13:41:28 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2012-05-29 17:40:55 -0700
commit75cba828b5c69299c3a4a1e33df8deae3a6c291e (patch)
tree04758b46a0551491ebecefd991049704b11c8dac /src
parent9a47237412035833ea5c6b7900b11fbd0da29b69 (diff)
Textile reader: fix for `<notextile>` and `==`.
Closes #517.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs13
1 files changed, 3 insertions, 10 deletions
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 <notextile> tags
escapedTag :: GenParser Char ParserState Inline
-escapedTag = try $ Str <$>
- enclosed (string "<notextile>") (try $ string "</notextile>") anyChar
+escapedTag = Str <$>
+ (try $ string "<notextile>" *> manyTill anyChar (try $ string "</notextile>"))
-- | Any special symbol defined in wordBoundaries
symbol :: GenParser Char ParserState Inline