Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add preventIndent option for partials | kpdecker | 2014-11-02 | 1 | -1/+6 |
| | | | | | This disables the standalone partial indent behavior required by the Mustache spec and allows for users to utilize partials in the same manner as under 1.x. Fixes #858 | ||||
* | Prune unused code | kpdecker | 2014-08-25 | 1 | -1/+1 |
| | |||||
* | Allow passing depths to _child | kpdecker | 2014-08-25 | 1 | -2/+2 |
| | |||||
* | Optimize compiler opcode call | kpdecker | 2014-08-24 | 1 | -1/+3 |
| | |||||
* | Move strip processing into AST helper logic | kpdecker | 2014-08-23 | 1 | -13/+1 |
| | | | | | We already have to track these behaviors for the standalone parsing and rather than having two whitespace pruning implementations this moves all of the behavior into one place. Fixes #852 | ||||
* | Replace string value rather than add omit flag | kpdecker | 2014-08-23 | 1 | -1/+1 |
| | |||||
* | Fix compiler program de-duping | kpdecker | 2014-08-14 | 1 | -9/+19 |
| | |||||
* | Drop unused Compiler.disassemble method | kpdecker | 2014-08-14 | 1 | -24/+0 |
| | |||||
* | Drop unused DECLARE opcode | kpdecker | 2014-08-14 | 1 | -4/+0 |
| | |||||
* | Implement recursive field lookup in compat mode | kpdecker | 2014-08-13 | 1 | -1/+7 |
| | | | | | | Provides the mustache behavior of recursive lookup without the use of depthed paths. Note that this does incur a fairly dramatic performance penalty for depthed queries. | ||||
* | Create contextName helper for context lookup | kpdecker | 2014-08-13 | 1 | -1/+2 |
| | |||||
* | Render indent for standalone partials | kpdecker | 2014-08-12 | 1 | -1/+1 |
| | |||||
* | Drop omitted content tags from generated output | kpdecker | 2014-08-12 | 1 | -1/+3 |
| | |||||
* | Do not lookup pathed helpers on the helper stack | kpdecker | 2014-07-12 | 1 | -1/+1 |
| | | | | Fixes #764 | ||||
* | Use ID lookup for ambiguous helper evaluation | kpdecker | 2014-07-07 | 1 | -0/+2 |
| | | | Final change for #731 | ||||
* | Rework lookup null protector logic | kpdecker | 2014-07-06 | 1 | -10/+5 |
| | | | | | | | - Move the lookup null protection out of `nameLookup` and into that contexts that are aware of the needs for falsy vs. not displayed values. - Optimize lookup for nested path operations Fixes #731 | ||||
* | Expose setup wrappers for compiled templates | kpdecker | 2014-05-19 | 1 | -2/+8 |
| | |||||
* | Pass full id to helperMissing | Tom Dale | 2014-05-13 | 1 | -1/+1 |
| | |||||
* | Fix evaluation of paths and subexprs | kpdecker | 2014-03-05 | 1 | -3/+1 |
| | | | Fixes #743 | ||||
* | properly handle multiple subexpressions in the same hash, fixes #748 | Jon Jensen | 2014-02-20 | 1 | -6/+6 |
| | | | | | push all hash params before popping any so as to avoid the last stackN var stomping previous ones | ||||
* | Add child accessor API | kpdecker | 2014-02-09 | 1 | -1/+8 |
| | |||||
* | Add support for depthed resolution of data fields | kpdecker | 2014-02-09 | 1 | -5/+1 |
| | |||||
* | Implement lookup helper | kpdecker | 2014-02-09 | 1 | -1/+2 |
| | |||||
* | Add trackIds compiler flag | kpdecker | 2014-01-17 | 1 | -0/+4 |
| | | | | Allows helpers that care about where a particular field came from derive this data while maintaining backward compatibility with existing helpers. | ||||
* | Fix missing parameters for pathed mustaches | kpdecker | 2014-01-17 | 1 | -1/+3 |
| | | | Fixes #658 | ||||
* | Allow decimal number values | kpdecker | 2014-01-17 | 1 | -2/+2 |
| | | | Fixes #472 | ||||
* | Implement partial hash evaluation | kpdecker | 2014-01-17 | 1 | -2/+8 |
| | |||||
* | Include name option for all helper calls | kpdecker | 2014-01-06 | 1 | -1/+1 |
| | | | | | | | | All helper calls will have access to `options.name` which is the first id value of the mustache operation. As part of this the helperMissing call has been simplified to remove the indexed name in order to optimize the call. This is a breaking change. Fixes #634 | ||||
* | Refactor out pushParams method | kpdecker | 2014-01-06 | 1 | -34/+19 |
| | | | Simplifies hash and param push logic | ||||
* | Track stringParams mode in local state vars | kpdecker | 2014-01-06 | 1 | -2/+3 |
| | |||||
* | Simplify ambiguous code | kpdecker | 2014-01-04 | 1 | -0/+1 |
| | | | | Remove if conditional in favor of boolean failover. | ||||
* | Include line info in compiler thrown exceptions | kpdecker | 2014-01-01 | 1 | -3/+2 |
| | | | Fixes #636 | ||||
* | Remove duplication from generated subexpressions | kpdecker | 2014-01-01 | 1 | -1/+1 |
| | |||||
* | Added support for subexpressions | machty | 2013-12-30 | 1 | -44/+46 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Make the environment reusable. | Blake Embrey | 2013-12-28 | 1 | -12/+9 |
| | |||||
* | Export AST as an object rather than module | kpdecker | 2013-12-01 | 1 | -1/+1 |
| | | | The parser expects the AST object to be mutable, which modules are not. | ||||
* | Wrap AST nodes in strip opcodes if defined | kpdecker | 2013-10-14 | 1 | -2/+14 |
| | |||||
* | Use accept for all compiler traversal | kpdecker | 2013-10-14 | 1 | -4/+3 |
| | |||||
* | Use template env and compile methods | kpdecker | 2013-10-09 | 1 | -3/+2 |
| | |||||
* | Use proper default vs. module import semantics | kpdecker | 2013-10-01 | 1 | -7/+5 |
| | |||||
* | Break exception class out into a standalone module | kpdecker | 2013-10-01 | 1 | -1/+1 |
| | |||||
* | Make the Handlebars environment into an object | Yehuda Katz | 2013-07-26 | 1 | -3/+3 |
| | | | | | | | | The idea is that the environment wraps up the mutable stuff in Handlebars (like the helpers) and that you could theoretically create a new one at any time and pass it in to Handlebars.template. Every test makes a new environment and uses it in template compilation. | ||||
* | Further progress towards modularization. | Yehuda Katz | 2013-07-24 | 1 | -6/+8 |
| | | | | | At this point, I have only 2 fails in the Node build, but I'm doing a bunch of manual stuff locally and still have a bunch of hacks. | ||||
* | Building an AMD file | Yehuda Katz | 2013-07-16 | 1 | -2/+1 |
| | |||||
* | Initial work on ES6 modules | Yehuda Katz | 2013-07-01 | 1 | -25/+21 |
| | |||||
* | Break JavascriptCompiler into standalone file | kpdecker | 2013-06-03 | 1 | -844/+2 |
| | |||||
* | Merge global and passed helpers and partials | kpdecker | 2013-05-31 | 1 | -2/+3 |
| | |||||
* | Allow execution of helpers on the context | kpdecker | 2013-05-30 | 1 | -1/+2 |
| | | | Fixes #285 | ||||
* | Protect from object prototype modifications | kpdecker | 2013-05-28 | 1 | -1/+3 |
| | | | | Fixes #534 | ||||
* | Add support for complex ids in @data references | kpdecker | 2013-05-27 | 1 | -2/+10 |
| | |||||
* | Merge pull request #454 from leshill/fix_string_mode_contexts | Kevin Decker | 2013-04-07 | 1 | -2/+13 |
|\ | | | | | Add contexts for string mode hash values | ||||
| * | Add contexts for string mode hash values | Les Hill | 2013-03-19 | 1 | -2/+13 |
| | | | | | | | | Allows for evaluating hash parameters such as ../city in string mode. | ||||
* | | Merge branch 'program-metadata' | kpdecker | 2013-04-07 | 1 | -6/+1 |
|\ \ | |||||
| * | | Add program metadata | kpdecker | 2013-02-17 | 1 | -6/+1 |
| |/ | | | | | | | | | | | Include program id and depth on the generated wrapper objects. This allows helpers who are passed these objects to differentiate between helpers for cases where they may want to cache the generated DOM structure. | ||||
* | | Restore knownHelpersOnly throw | kpdecker | 2013-04-06 | 1 | -1/+1 |
| | | | | | | Fixes #302 | ||||
* | | Allow compilation of empty string | kpdecker | 2013-04-06 | 1 | -2/+2 |
| | | | | | | Fixes #461 | ||||
* | | Escape unicode newlines in string literals | kpdecker | 2013-04-06 | 1 | -1/+3 |
|/ | | | Fixes #375 | ||||
* | Fix #428 nested if else rendering | kpdecker | 2013-02-16 | 1 | -0/+11 |
| | | | | The program equality checker was not taking children into account when determining equality, causing breakages under similar cases. | ||||
* | Merge pull request #442 from tricknotes/fix-method-name-in-error-message | Kevin Decker | 2013-02-16 | 1 | -1/+1 |
|\ | | | | | Fix method name in error message | ||||
| * | Fix method name in error message | Ryunosuke SATO | 2013-02-16 | 1 | -1/+1 |
| | | | | | | | | - compile -> precompile | ||||
* | | Use local vars | kpdecker | 2013-02-16 | 1 | -4/+4 |
| | | |||||
* | | Remove unnecessary child scopes | kpdecker | 2013-02-16 | 1 | -1043/+1040 |
|/ | |||||
* | merge | Tommy Messbauer | 2013-02-11 | 1 | -83/+284 |
|\ | |||||
| * | Better error messages for precompiler runtime mismatch | Peter Wagenet | 2013-02-09 | 1 | -1/+3 |
| | | |||||
| * | Decouple compiler version checks from release versions | Peter Wagenet | 2013-02-08 | 1 | -1/+1 |
| | | |||||
| * | Handlebars.parse/precompile/compile can now be passed an already-compiled ↵ | machty | 2013-02-07 | 1 | -8/+8 |
| | | | | | | | | Handlebars AST. | ||||
| * | Improved precompile template version check | Peter Wagenet | 2013-01-30 | 1 | -4/+1 |
| | | | | | | | | | | This check reduces duplicated code as well as also failing if the template was precompiled on a version before the check was added. | ||||
| * | Check version when evaluating templates. | Peter Wagenet | 2013-01-29 | 1 | -0/+7 |
| | | | | | | | | | | This makes sure that we throw an error when a template was precompiled with a version of Handlebars that doesn't match the evaluating version. | ||||
| * | mergeSource helper | kpdecker | 2013-01-21 | 1 | -10/+14 |
| | | |||||
| * | Merge duplicate programs | kpdecker | 2013-01-21 | 1 | -6/+43 |
| | | |||||
| * | Remove inline option from pushStack | kpdecker | 2013-01-21 | 1 | -13/+9 |
| | | |||||
| * | Use push rather than pushStack for inline ops | kpdecker | 2013-01-21 | 1 | -11/+11 |
| | | |||||
| * | Make replaceStack always inline | kpdecker | 2013-01-20 | 1 | -6/+6 |
| | | |||||
| * | Formatting updates for inlined content | kpdecker | 2013-01-20 | 1 | -2/+2 |
| | | |||||
| * | Merge consecutive buffer appends | kpdecker | 2013-01-20 | 1 | -10/+30 |
| | | |||||
| * | Use options register for blockHelperMissing | kpdecker | 2013-01-20 | 1 | -4/+9 |
| | | |||||
| * | Inline known helper calls | kpdecker | 2013-01-20 | 1 | -1/+1 |
| | | |||||
| * | Use stack rather than register for invoke lookup | kpdecker | 2013-01-20 | 1 | -4/+6 |
| | | |||||
| * | Prevent duplication of inline content in append | kpdecker | 2013-01-20 | 1 | -0/+3 |
| | | |||||
| * | Update 2nd level opcodes to use inlines | kpdecker | 2013-01-19 | 1 | -11/+19 |
| | | |||||
| * | Allow replaceStack to work with the inline stack | kpdecker | 2013-01-19 | 1 | -8/+35 |
| | | |||||
| * | Use inline values for simple terminals | kpdecker | 2013-01-19 | 1 | -4/+5 |
| | | |||||
| * | Inline stack helper implementation | kpdecker | 2013-01-19 | 1 | -16/+48 |
| | | |||||
| * | Merge branch 'master' into inline-ops | kpdecker | 2013-01-19 | 1 | -4/+3 |
| |\ | |||||
| | * | Remove unused vars | kpdecker | 2013-01-19 | 1 | -4/+3 |
| | | | |||||
| * | | Reuse stack var to avoid register | kpdecker | 2013-01-19 | 1 | -2/+1 |
| | | | |||||
| * | | Output options only once to unknownHelper case | kpdecker | 2013-01-19 | 1 | -6/+12 |
| | | | |||||
| * | | Empty hash literal output | kpdecker | 2013-01-19 | 1 | -4/+11 |
| | | | |||||
| * | | Inline foundHelper lookup | kpdecker | 2013-01-19 | 1 | -4/+4 |
| |/ | |||||
| * | Must pop the stack extra for hashes | tomhuda | 2013-01-18 | 1 | -0/+1 |
| | | |||||
| * | Add support for getting types in string mode | Yehuda Katz | 2013-01-16 | 1 | -10/+39 |
| | | | | | | | | | | This makes it possible to determine whether an argument was passed as a string or as a path when implementing helpers in string mode. | ||||
| * | Prevent write on all depth variables | kpdecker | 2013-01-13 | 1 | -1/+1 |
| | | |||||
| * | Prevent context overwrite by replaceStack | kpdecker | 2013-01-13 | 1 | -7/+14 |
| | | | | | | Fixes #408. | ||||
| * | Remove duplicate assignment | kpdecker | 2013-01-13 | 1 | -1/+1 |
| | | |||||
| * | Removed unnecessary semicolon, which is needed to pass JSHint for compiled code | Andrey Lushchick | 2012-12-27 | 1 | -1/+1 |
| | | |||||
| * | Merge pull request #389 from leshill/partial_names | Yehuda Katz | 2012-12-23 | 1 | -2/+2 |
| |\ | | | | | | | Partials can be paths | ||||
| | * | Partials can be paths | Les Hill | 2012-12-13 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | Allows partials with slashes, a common partial syntax. For example: {{> shared/dude}} | ||||
| * | | Merge pull request #390 from eastridge/master | Yehuda Katz | 2012-12-23 | 1 | -2/+6 |
| |\ \ | | | | | | | | | Make {data: true} a default compile option | ||||
| | * | | Add data = true as default option | Ryan Eastridge | 2012-12-13 | 1 | -2/+6 |
| | |/ | |||||
| * | | Get a better error for compile(falsy) | Yehuda Katz | 2012-12-23 | 1 | -0/+8 |
| |/ |