Quote:
Originally Posted by DiapDealer
There are however, situations where there's html code contained within comments that SmartyPants will barf hard on regardless. Fixing that might not be trivial, but I'd rather work on a solution that ignores ALL html comments entirely rather than slapping something together that only fixes this specific comment.
|
In theory, ignoring HTML comments should be simple. If "<!--" is found, scan ahead until "-->" or EOF is found, and ignore everything in between: HTML code, equations, scripts, whatever. Of course, depending on how the algorithm in this instance is designed, "scan ahead" may not be feasible.
Maybe a preprocessing pass that removes comments to store them in a list somewhere, then a post pass that puts them back? (I'm really just spitballing here, having not looked at the code.)