aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-23 10:28:54 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-23 10:28:54 -0700
commita820c1bd1c8b5de0c2b8f8e6bdac5a8fc6602247 (patch)
tree5a4d2da3d75beac418e18fe1e6b7c1f39a20a56c /src/Text/Pandoc/Readers
parent139d418d4b1abe740cd889dbc3f5770fe97f2684 (diff)
downloadpandoc-a820c1bd1c8b5de0c2b8f8e6bdac5a8fc6602247.tar.gz
Textile reader: fixed attributes.
Attributes can't be followed by a space. So, _(class)emph_ but _(noclass) emph_ Closes #2984.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 6f64540f8..17c6583ff 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -594,10 +594,12 @@ specialAttribute = do
("justify" <$ try (string "<>")) <|>
("right" <$ char '>') <|>
("left" <$ char '<')
+ notFollowedBy spaceChar
return $ addStyle ("text-align:" ++ alignStr)
attribute :: Parser [Char] ParserState (Attr -> Attr)
-attribute = classIdAttr <|> styleAttr <|> langAttr
+attribute = try $
+ (classIdAttr <|> styleAttr <|> langAttr) <* notFollowedBy spaceChar
classIdAttr :: Parser [Char] ParserState (Attr -> Attr)
classIdAttr = try $ do -- (class class #id)