diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-15 14:11:50 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-15 14:15:53 -0800 |
commit | 63cf37a9ca0cd9ffbc0a7a7091c5420f68a09dfe (patch) | |
tree | bc604f4c2deeb44952ad0de2267e3fb6c592c644 | |
parent | a312d2a8aec49343ec9e8353098a2142a7c7851f (diff) | |
download | pandoc-63cf37a9ca0cd9ffbc0a7a7091c5420f68a09dfe.tar.gz |
HTML reader: allow : in tags.
Resolves Issue #274.
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index ed026eb49..ade15349e 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -164,7 +164,9 @@ anyHtmlTag :: GenParser Char ParserState [Char] anyHtmlTag = try $ do char '<' spaces - tag <- many1 alphaNum + first <- letter + rest <- many (alphaNum <|> char ':') + let tag = first : rest attribs <- many htmlAttribute spaces ender <- option "" (string "/") @@ -181,7 +183,9 @@ anyHtmlEndTag = try $ do spaces char '/' spaces - tag <- many1 alphaNum + first <- letter + rest <- many (alphaNum <|> char ':') + let tag = first : rest spaces char '>' let result = "</" ++ tag ++ ">" |