git.iko.soy/typeable/pandoc
on master help sign in
Textile: Improvements to surround and symbol.
d6ddc2fJohn MacFarlane
src/Text/Pandoc/Readers/Textile.hs+2−2
@@ -522,7 +522,7 @@ escapedTag = Str <$>
522
522
523-- | Any special symbol defined in wordBoundaries
523-- | Any special symbol defined in wordBoundaries
524symbol :: Parser [Char] ParserState Inline
524symbol :: Parser [Char] ParserState Inline
525−symbol = Str . singleton <$> oneOf wordBoundaries
525+symbol = Str . singleton <$> (oneOf wordBoundaries <|> oneOf markupChars)
526
526
527-- | Inline code
527-- | Inline code
528code :: Parser [Char] ParserState Inline
528code :: Parser [Char] ParserState Inline
@@ -546,7 +546,7 @@ attributes = choice [ enclosed (char '(') (char ')') anyChar,
546surrounded :: Parser [Char] st t -- ^ surrounding parser
546surrounded :: Parser [Char] st t -- ^ surrounding parser
547 -> Parser [Char] st a -- ^ content parser (to be used repeatedly)
547 -> Parser [Char] st a -- ^ content parser (to be used repeatedly)
548 -> Parser [Char] st [a]
548 -> Parser [Char] st [a]
549−surrounded border = enclosed border (try border)
549+surrounded border = enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try border)
550
550
551-- | Inlines are most of the time of the same form
551-- | Inlines are most of the time of the same form
552simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
552simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser