-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I've been unable to parse a number of HTML5 pages, with tdom giving errors that sounded odd. This requires further investigation but I have at least noticed one case where reporting is poor:
<nav>
<div>foo
<div>bar</div>
</nav>
Obviously here the first
has not been properly closed. However the error reported is:
error "Unterminated element 'nav' (within 'div')" at position 141
"<title></title>
</head>
<body>
<h1></h1>
<nav>
<div>foo
<div>bar</div>
</nav> <--Error--
This is with tdom 0.8.3 and the -html option. It seems the fuzzy logic is interpreting the unclosed <div> wrong, or is reported wrong. The preferred model, especially with -html, would be for it to close the unclosed <div> upon the close of the enclosing <nav>, and thus ignore the bad HTML (possibly contain it as a warning that could be checked separately, if the code wishes).
Metadata
Metadata
Assignees
Labels
No labels