This adds some validation options for when HTML is bad. Currently, it just fails epically. We can talk about the DSL because this PR does add options that could change what parse returns (an object instead of an HTML node) but I found that we need more info about the parse command. Was the html invalid, was it parsed properly etc.
We added two methods
1) validate
sees if there are missing broken tags and returns an object with the valid status
This adds some validation options for when HTML is bad. Currently, it just fails epically. We can talk about the DSL because this PR does add options that could change what parse returns (an object instead of an HTML node) but I found that we need more info about the parse command. Was the html invalid, was it parsed properly etc.
We added two methods 1) validate sees if there are missing broken tags and returns an object with the valid status
2) fixHtml attempts to fix the html and parse it.