summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-09-28 23:01:41 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2012-09-28 23:01:41 -0400
commitd6ddc2ff614a66ca135ce44140f469500c3cb6b6 (patch)
treed0d637f127aac32ec1224be4684b04c24f6cccc2 /src/Text/Pandoc
parent2fbdf9e0028db93b7913d3c13196e122a7fc2c74 (diff)
Textile: Improvements to surround and symbol.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs4
1 files changed, 2 insertions, 2 deletions
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