summaryrefslogtreecommitdiffstats
path: root/spec/tokenizer.js
Commit message (Collapse)AuthorAgeFilesLines
* Allow for escaped ] characters in [] IDskpdecker2015-09-161-0/+5
| | | | | | | | Allows for ] literal characters to be used within [] IDs by prefixing them with the \ character. `\` literal at the end of the may be referenced by the `\\` sequence if conflicting. Under most circumstances the `\\` sequence will continue to work. Potentially breaking change for users of [] ids that have `\\` anywhere in the id or `\` at the end of the id. Fixes #1092
* Add decorator parsingkpdecker2015-08-221-0/+9
|
* Implement partial blockskpdecker2015-08-221-0/+4
| | | | | | This allows for failover for missing partials as well as limited templating ability through the `{{> @partial-block }}` partial special case. Partial fix for #1018
* Fix tokenizer test for double quoted stringsAymerick2015-05-011-1/+1
| | | | | There is two consecutive tests with the same input data: "{{ foo bar \'baz\' }}" I suppose the first test should be about testing double quoted string.
* Add full support for es6kpdecker2015-04-161-131/+130
| | | | | | | | Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions. Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules. Fixes #855 Fixes #993
* Add undefined and null literal supportkpdecker2015-04-071-0/+7
| | | | | This adds the UndefinedLiteral and NullLiteral to AST. Fixes #990
* Allow blockParams on chained inverse statementskpdecker2014-11-291-3/+7
|
* Add parser support for block paramsMartin Muñoz2014-11-111-0/+14
|
* Allow whitespace control on commentskpdecker2014-11-021-3/+3
| | | | | This changes the call signature for the CommentNode constructor, which is a potentially breaking change for AST users. Fixes #866
* Refactor blocks, programs and inversesMartin Muñoz2014-07-291-4/+4
|
* Allow decimal number valueskpdecker2014-01-171-6/+14
| | | Fixes #472
* Added support for subexpressionsmachty2013-12-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handlebars now supports subexpressions. {{foo (bar 3)}} Subexpressions are always evaluated as helpers; if `3` were omitted from the above example, `bar` would be invoked as a param-less helper, even though a top-levell `{{bar}}` would be considered ambiguous. The return value of a subexpression helper is passed in as a parameter of a parent subexpression helper, even in string params mode. Their type, as listed in `options.types` or `options.hashTypes` in string params mode, is "sexpr". The main conceptual change in the Handlebars code is that there is a new AST.SexprNode that manages the params/hash passed into a mustache, as well as the logic that governs whether that mustache is a helper invocation, property lookup, etc. MustacheNode, which used to manage this stuff, still exists, but only manages things like white-space stripping and whether the mustache is escaped or not. So, a MustacheNode _has_ a SexprNode. The introduction of subexpressions is fully backwards compatible, but a few things needed to change about the compiled output of a template in order to support subexpressions. The main one is that the options hash is no longer stashed in a local `options` var before being passed to either the helper being invoked or the `helperMissing` fallback. Rather, the options object is inlined in these cases. This does mean compiled template sizes will be a little bit larger, even those that don't make use of subexpressions, but shouldn't have any noticeable impact on performance when actually rendering templates as only one of these inlined objects will actually get evaluated.
* Merge branch 'fix-escapes' of github.com:dmarcotte/handlebars.js into ↵kpdecker2013-12-231-6/+16
|\ | | | | | | | | | | | | dmarcotte-fix-escapes Conflicts: spec/tokenizer.js
| * Fix "\\{{" immediately following "\{{"Daniel Marcotte2013-11-061-6/+16
| | | | | | | | | | | | | | | | | | Escaped-escape mustaches ("\\{{") immediately following escaped mustaches ("\{{") were being handled incorrectly. Fix the lookahead to make sure yytext still contains the appropriate slashes when we pop out of <emu> so they can be handled consistently by the initial state.
* | Fix tokenizer tests under IEkpdecker2013-12-231-5/+5
| |
* | Move away from should asserts to internalkpdecker2013-12-231-119/+118
|/ | | | This is needed as neither Sinon nor Chai support in-browser testing under IE.
* Fix "\\" escapingDaniel Marcotte2013-10-131-0/+38
| | | | | Previously, "\\{{foo}}" would only result in the desired "\fooValue" if it was at the beginning of the file or immediately after a close stache.
* Refactor qunit unit testskpdecker2013-06-011-2/+5
| | | | | | Allows for testing node, browser, and precompiled modes in the node tests. Also reorganizes the qunit spec file to provide better organization.
* Convert parser and tokenizer tests to javascriptkpdecker2013-06-011-0/+317