Remove the concept of a "Special" as a generalization of template tags in HTML parsing and the HTMLjs tree. Just call something that's parsed by hooking the HTML parser a TemplateTag. Don't wrap the return value of getSpecialTag (now getTemplateTag), just require that it be an instanceof HTMLTools.TemplateTag.
Spacebars.TemplateTag is now a subclass of HTMLTools.TemplateTag. Both support `.toJS()`. The same object returned by getTemplateTag is now inserted into the HTMLjs -- that is, the Spacebars compiler creates an HTMLTools.TemplateTag instead of it being created as a wrapper inside HTMLTools. All usages of the words "special" or "special tag" are replaced with "template tag."
We now no longer check whether we're at a closing
HTML tag by peeking for "</" since that would fail
if there were a {{! }} comment directly before it.
Instead, we tokenize and then rewind. Presumably
this does have an effect on compilation time but it's
probably fine. An alternative would have been to
explicitly parse {{! }} comments rather than implicitly
skipping them before generally parsing tokens.
- Start shrinking html.js down to the 150-line file it can be
- Move "proper case" logic to the template compiler; the tagName of an HTMLjs tag is now in proper case. This is both for better performance and reduced size and complexity of runtime code (i.e. blaze.js).
- Start moving html-tools to the HTMLTools namespace
We would choke on CR line endings, because we didn't implement the preprocessing step of converting CR(LF)? to LF. Now we correctly convert (or ignore) CR inside tags, in text nodes, in attributes, and in comments.