google/gumbo-parser — pull request #274 by nostrademons (2014-11-10 09:44:58+00:00)
Title: Template tag

This is a fairly large branch that:

1. Updates the element creation/insertion machinery to match the current spec language.
2. Updates the adoption agency algorithm to match the current spec language.
3. Implements the template tag.

It adds a GUMBO_NODE_TEMPLATE NodeType, and uses this for templates, with the "template contents" being the same v.element field that elements use. A separate node type was chosen so that template contents are invisible to clients that recurse on ELEMENT, which is what we expect most will do.

All spec clauses related to templates have been implemented. There are still a couple bugs, but this drops the number of failing html5lib-dev tests from 125 to 84, with many others being ones I've already fixed in another branch.

Fixes #2 and also relate to #3, #43, and #266. @ajklein, @FlorianRappl, or @craigbarnes, any of you want to review?