Commit Graph

14 Commits

Author SHA1 Message Date
David Greenspan
31fc5b0887 Add textarea parse tests
Test for bugs reported by Andrew and Vincent, concerning parsing of dynamic attributes and contents of textarea.
2014-07-16 14:04:12 -07:00
David Greenspan
e0d6a2ef00 Make events and textareas work! 2014-06-30 17:49:03 -07:00
David Greenspan
a2552be8f8 HTMLTools: Kill "Special" as a TemplateTag wrapper
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."
2014-04-24 10:18:02 -07:00
David Greenspan
1e7b91feaa Fix some tests 2014-04-22 15:55:56 -07:00
Avital Oliver
9ef97fc297 Better parsing for {{! }} comments
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.
2014-03-21 22:08:02 -07:00
David Greenspan
57f11cb961 Use HTMLTools namespace for all of html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
f6c766ae06 Start html.js refactor; case-fold at compile time
- 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
2014-03-03 15:51:35 -08:00
David Greenspan
5038c63d08 Merge shark, including shark-isolate-helpers work 2014-01-27 15:21:23 -08:00
David Greenspan
43cb4f8cc8 Rename tests in html-tools package to html-tools 2014-01-27 14:44:19 -08:00
David Greenspan
b9378d02b7 remove duplicate test 2014-01-25 17:52:37 -08:00
David Greenspan
7be0250867 Fix CRLF handling in HTML tokenizer
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.
2014-01-20 19:19:07 -08:00
David Greenspan
40d4d9cd84 document html-tools 2014-01-06 21:25:40 -08:00
David Greenspan
30a4b2b7d4 Fix bug in parsing of HTML attributes
e.g. <foo bar baz>.  (D'oh.)
2013-12-18 12:09:35 -08:00
David Greenspan
b20119775f rename package "html" -> "html-tools" 2013-12-11 20:14:26 -08:00