Closed nolanw closed 11 years ago
Critic review: https://critic.hoppipolla.co.uk/r/219
This is an external review system which you may optionally use for the code review of your pull request.
Any reason to not do template? (Note <template>
parsing has now been merged into the HTML spec.)
Do you want to merge this now or wait until you've done the rest? I'm going to basically take this on trust, given I'm not reviewing this until I get around to fixing html5lib-python and then only in terms of what we disagree on.
The test files I skipped (template, tests09, tests10) were because my parser and html5lib-python disagreed on the resulting tree in some of the tests. For template, I simply haven't implemented it yet. For tests09 and tests10, it's a small part of the spec I don't yet understand.
Let's wait to merge until I finish tests09 and tests10. I'll know by then if I'm going to do template anytime soon.
I'ma pass on the template tests for now, so feel free to merge it up!
I've gone through nearly all the tree construction tests and updated the parse errors.
My method was to take each test and compare the number of reported parse errors between html5lib-python and the parser I'm working on. Where they agreed, I simply pasted html5lib-python's errors in. Where they disagreed, I stepped through with the spec in hand and tried to tease out the proper errors. (Sometimes html5lib-python looked right. Sometimes my parser looked right. Sometimes neither looked right. And I'm sure I didn't get them all right, but I think it's a good deal better than nothing.) Note that although the number of errors for a given test may be agreed upon between the two parsers, I did not verify that those errors are accurately described.
I have not yet done tests09 and tests10. I'll add them later, in this or another pull request. I have not done, and do not plan to do, template.
I did delete one test: the fifth test in tests18. It was an exact duplicate of the fourth test in tests18.
Whenever I resolved disagreements between the parsers against html5lib-python, I took notes. They're available in this gist in hopes that they may be helpful. I numbered the tests in each file starting with zero, as they were before any commits in this pull request.
Fixes #14 (and then some).