diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-06-23 10:28:54 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-06-23 10:28:54 -0700 |
commit | a820c1bd1c8b5de0c2b8f8e6bdac5a8fc6602247 (patch) | |
tree | 5a4d2da3d75beac418e18fe1e6b7c1f39a20a56c /src/Text | |
parent | 139d418d4b1abe740cd889dbc3f5770fe97f2684 (diff) | |
download | pandoc-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')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 4 |
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) |