Fixed bug in HTML attribute parser: now a space is

required before an attribute.  Previously, <a.b>
would be parsed as an HTML tag with an attribute!


git-svn-id: https://pandoc.googlecode.com/svn/trunk@509 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-01-24 19:07:35 +00:00
parent ca6cb23f23
commit c61f2b6984

View file

@ -140,7 +140,7 @@ htmlAttribute = htmlRegularAttribute <|> htmlMinimizedAttribute
-- minimized boolean attribute (no = and value)
htmlMinimizedAttribute = try (do
spaces
many1 space
name <- many1 (choice [letter, oneOf ".-_:"])
spaces
notFollowedBy (char '=')
@ -148,7 +148,7 @@ htmlMinimizedAttribute = try (do
return (name, content, (" " ++ name)))
htmlRegularAttribute = try (do
spaces
many1 space
name <- many1 (choice [letter, oneOf ".-_:"])
spaces
char '='