From d6ddc2ff614a66ca135ce44140f469500c3cb6b6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 28 Sep 2012 23:01:41 -0400 Subject: Textile: Improvements to surround and symbol. --- src/Text/Pandoc/Readers/Textile.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 49f20ba29..41600c7ee 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -522,7 +522,7 @@ escapedTag = Str <$> -- | Any special symbol defined in wordBoundaries symbol :: Parser [Char] ParserState Inline -symbol = Str . singleton <$> oneOf wordBoundaries +symbol = Str . singleton <$> (oneOf wordBoundaries <|> oneOf markupChars) -- | Inline code code :: Parser [Char] ParserState Inline @@ -546,7 +546,7 @@ attributes = choice [ enclosed (char '(') (char ')') anyChar, surrounded :: Parser [Char] st t -- ^ surrounding parser -> Parser [Char] st a -- ^ content parser (to be used repeatedly) -> Parser [Char] st [a] -surrounded border = enclosed border (try border) +surrounded border = enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try border) -- | Inlines are most of the time of the same form simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser -- cgit v1.2.3