From a820c1bd1c8b5de0c2b8f8e6bdac5a8fc6602247 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 23 Jun 2016 10:28:54 -0700 Subject: Textile reader: fixed attributes. Attributes can't be followed by a space. So, _(class)emph_ but _(noclass) emph_ Closes #2984. --- src/Text/Pandoc/Readers/Textile.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3