Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch to support doctype with test #48

Closed
wants to merge 3 commits into from

Conversation

deanmao
Copy link
Contributor

@deanmao deanmao commented May 2, 2012

Hi, earlier I made an issue, but figured it would be more efficient if I just wrote the code. This is the issue:
#47

@tautologistics
Copy link
Owner

Thanks! I am going to merge your pull but expand it to generally support XML/HTML declarations of the type "<!" and "<?". Looking into that now...

@deanmao
Copy link
Contributor Author

deanmao commented May 4, 2012

Also there was another small issue with attributes that had no values,
something like this:

. The "by-zero" part caused it
to think that it needed to wait for more data and would stop parsing the
rest of the output. The commit below fixes it:

deanmao@fdcdd0a

I've been using your new 2.x parser with my fixes on lots of webpages now
-- so far no issues!

On Fri, May 4, 2012 at 6:14 AM, Chris Winberry <
[email protected]

wrote:

Thanks! I am going to merge your pull but expand it to generally support
XML/HTML declarations of the type "<!" and "<?". Looking into that now...


Reply to this email directly or view it on GitHub:

#48 (comment)

AndreasMadsen referenced this pull request in AndreasMadsen/htmlparser2 Jun 6, 2013
[tokenizer] text in special tags there looks like a tag ending
@CWindatt
Copy link

This fix was merged with the following commit, but this pull request remains open.
6bcd609

There is an issue with this fix that it fails to update the location correctly. It will increase the col based on the doctype data, but doesn't account for the text. To fix, add the following to the end of _updateLocation line 624

} else if (node.type === Mode.Doctype) {
this._col += 10;
}

@deanmao deanmao closed this Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants