Parse error class checks for correct number of arguments to its emitter
and does seem to have correctly complained about the empty tag errors
Duplicate attributes should not be checked if the token is an end tag
Finally, used null coalescing to silence an undefined variable
• Updated mensbeam/intl dependency.
• Moved scope methods from Element to OpenElementsStack. They don't need to be used outside of the parser and don't make sense there.
• Cleaned up parse errors. Displaying what is expected or found is not helpful.
• Added exceptions for disabled inherited DOMDocument methods that don't make sense in an HTML5 library.
• Moved the inherited methods from the Printing trait to Document as DocumentFragment and Element don't inherit anything to print.
• Moved the ancestor and descendant methods into their own traits along with the compare method which they share.
• Made DocumentFragment use only the descendant methods and not the ancestor ones.
• Fixed error in README.
• Added an option to use Document::loadHTML or Document::load to parse a document.
• Made the DOM elements use dW\HTML5 namespace instead of dW\HTML5\DOM.
• Fixed where TreeBuilder wasn't being properly destructed when the parser is finished.
• Discovered a way to extend the existing DOM tools, so Parser now works with custom classes for the DOM.
• \dW\HTML5\DOM is no longer needed, and its functionality has been split between DOM\Document and DOM\Element.
• Printer's functionality is now handled by DOM\Document\saveHTML through a trait to make maintenance easier.
• Normalized Exception constants.
• Fixed various typing bugs.
• Oops. Didn't have the \ in front of the DOM classes.
• Forgot function keyword on Printer::escapeString.
• Finished out the spec on Printer::serialize.
• Fixed bug where Data::consumeWhile and Data::consumeUntil wouldn't move the pointer back one position if there were no matches.
• Changed DataStream to Data.
• Made each class have its own debug static property so each can print debug information separately.
• Removed dependency on ext-mbstring.
• Fixed bug where when using DataStream::consumeUntil and DataStream::consumeWhile where the column would be advanced whether the pointer was moved or not.
• Changed DataStream from using an internal array storage to using /mensbeam/intl, much more efficient and in line with the specification.
• DataStream now calculates the line and column as it goes instead of relying upon a weird array of positions.
• Removed dependency on ext-intl.
• The document was being rewritten when tree building and therefore not being output when the parser completed.
• Allowed DOM to be instanced, containing an implementation and document so the tree builder can create a document when a doctype is found.
• PHP's DOM returns null when the namespace isn't specified, so it was causing the dispatcher to parse tokens in foreign content when it wasn't supposed to.
• Added debugging output for TreeBuilder, showing the insertion mode and foreign if content is foreign.
• Fixed syntax errors that weren't caught in last commit
• Made the token insertion methods static in Parser so that ActiveFormattingElementsList::reconstruct can insert methods without having to access the Parser instance itself. Might do it differently later, but this works for now.
• Since the fragment context that is passed to Stack can be null it is necessary to check whether the argument is valid before continuing.
• Parser::instance is now protected as all classes are now decoupled.
Changing static:: to self:: makes constant de-referencing a
compile-time operation rather than run-time, potentially improving
performance. As constants cannot be overridden by extending classes,
there is no advantage to using static:: for these constants
• Changed the name of the parser instance variable from Parser::$self to Parser::$instance
• Added parse errors for entities into ParseError.
• Moved Parser::fixDOM to DOM::fixIdAttributes.
• Added an exception for when the tokenizer enters an invalid state (infinite looping).
• Made ParseError use Parser::$instance->data instead of a passed around DataStream object.