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."
Some failing tests, which are hopefully mostly just tests of the modified code that need to be ported.
The main work was replacing the use of pseudo-attributes $special and $dynamic with the new HTML.Attrs(...) / array representation. Some functions were also rewritten to use Visitors (`toJS`, old `toHTML`/`toText`/`evaluateAttributes`, `replaceSpecials` in the compiler, but not `optimize` yet or `materialize`).
Create the "blaze-tools" package to hold toJS and other functions that are useful for template parsers/compilers that need to read or generate JS.
- 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.
Give better errors (and in some cases, errors at all) for cases like:
- `<a {{{x}}}>`
- `<a {{#if x}}foo{{/if}}>`
- `<a {{k}}={{v}}>`
- `<a x{{y}}=z>`
Also, allow comments (`{{! x}}`) anywhere a non-comment tag is allowed