Fixed htmlTag
in HTML reader.
Require that `<!` or `<?` be followed by nonspace. This prevents `</ div>` from being parsed as a comment. Closes #1820.
This commit is contained in:
parent
0c5f57aab9
commit
13b230a1b5
1 changed files with 1 additions and 1 deletions
|
@ -887,7 +887,7 @@ htmlTag :: Monad m
|
|||
=> (Tag String -> Bool)
|
||||
-> ParserT [Char] st m (Tag String, String)
|
||||
htmlTag f = try $ do
|
||||
lookAhead $ char '<' >> (oneOf "/!?" <|> letter)
|
||||
lookAhead $ char '<' >> ((oneOf "/!?" >> nonspaceChar) <|> letter)
|
||||
(next : _) <- getInput >>= return . canonicalizeTags . parseTags
|
||||
guard $ f next
|
||||
-- advance the parser
|
||||
|
|
Loading…
Reference in a new issue