Commit Graph

258 Commits

Author SHA1 Message Date
behrooz shabani (everplays)
4e0ed3c7ae more escaping related fixes 2014-03-21 03:29:31 +03:30
behrooz shabani (everplays)
d719bd12ca don't eat up backslashes. fixes #59 2014-03-21 02:39:59 +03:30
behrooz shabani (everplays)
97201fe861 local merge of #56 PR. fixes 54 2014-03-20 22:55:05 +03:30
majortom731
ffcbecf346 Implemented proper treatment of brackets inside string arguments in subexpressions ( {{foo '(bar)'}} ) 2014-03-17 23:01:30 +01:00
majortom731
5a58d27ad3 Added test for correctness of treatment of brackets inside string arguments ( {{foo '(bar)'}} ) 2014-03-17 23:00:36 +01:00
majortom731
30f7afeb84 More code style / indentation fixes 2014-03-17 16:46:12 +01:00
majortom731
5257701669 Fixed indentation / code style 2014-03-17 16:41:54 +01:00
behrooz shabani (everplays)
7f6dcf6c3e final touch on fixing missing copyright notices 2014-03-17 13:44:21 +03:30
behrooz shabani (everplays)
413585f9ce Added missing copyright notices. fixes #57 2014-03-17 00:58:50 +03:30
majortom731
41722af86d Added testHelperSubexpressions() 2014-03-12 19:39:05 +01:00
majortom731
4bc443e834 Added testHelperSubexpressions() 2014-03-12 19:34:15 +01:00
majortom731
3fc92fcdc5 Added support for subexpressions in helper calls. Not sure if Template.php is the best place to handle subexpressions... 2014-03-12 19:33:46 +01:00
majortom731
5c3ea257b7 Changed the internal 'if' helper such that it can test not only paths/variable names, but also numeric constants.
This will be helpful for subexpressions later, when testing numeric subexpressions return values,

eg: {{#if (eq 0 (mod @index 3))}}

Also added a test for this.
2014-03-12 17:00:09 +01:00
majortom731
d7a9844e93 Changed the internal 'if' helper such that it can test not only paths/variable names, but also numeric constants.
This will be helpful for subexpressions later, when testing numeric subexpressions return values,

eg: {{#if (eq 0 (mod @index 3))}}

Also added a test for this.
2014-03-12 16:59:54 +01:00
behrooz shabani (everplays)
da443c5fd5 added support for escaping tags. fixes #53 2014-03-08 14:50:08 +03:30
fzerorubigd
9c91ea7d64
add another test 2014-02-26 21:13:11 +03:30
fzerorubigd
939c58bbee
Some test improvement and add an ArrayLoader 2014-02-26 20:26:51 +03:30
Behrooz Shabani
3514a2b151 Merge pull request #51 from Mibew/each_special_variables
Each special variables
2014-02-25 22:40:26 +03:30
Dmitriy Simushev
39dd482df5 Add "@first" and "@last" values to "each" helper 2014-02-25 13:24:41 +00:00
Dmitriy Simushev
9d62ffd581 Use both "@index" and "@key" for associative arrays 2014-02-25 12:40:47 +00:00
Fzerorubigd
5b188ce19e Merge pull request #48 from Mibew/auto_esc_vars_tests
Add tests for auto escape variables content
2014-02-05 23:10:31 +03:30
Dmitriy Simushev
478d28b20f Add tests for auto escape variables content 2014-02-05 14:03:56 +00:00
Behrooz Shabani
40f0eb9b7b Merge pull request #47 from Mibew/improved_ids
Add segment-literal notation for expressions
2014-02-05 13:11:12 +03:30
Dmitriy Simushev
b4c019372b Add segment-literal notation for expressions 2014-02-05 09:07:02 +00:00
fzerorubigd
6a3e666258
add hhvm to build matrix 2014-02-04 00:03:23 +03:30
Fzerorubigd
0d90d4e294 Merge pull request #45 from Mibew/safe_string
Add \Handlebars\SafeString class
2014-02-03 12:27:11 -08:00
Dmitriy Simushev
79373a193a Add \Handlebars\SafeString class 2014-02-03 08:50:01 +00:00
Behrooz Shabani
8650422483 Merge pull request #43 from Mibew/fix_helpers_auto_esc
Use handlebars escape function for helpers' results
2014-02-01 03:05:31 -08:00
Dmitriy Simushev
b6a903fee8 Use handlebars escape function for helpers' results 2014-02-01 10:44:23 +00:00
behrooz shabani (everplays)
3a3ab36c5f escape helpers. fixes #42 2014-02-01 11:29:52 +03:30
Dmitriy Simushev
390bc70a0c Add test for helpers auto escaping 2014-01-31 15:12:44 +00:00
Behrooz Shabani
44a6f96e96 Merge pull request #41 from Mibew/each_reset_stop_token
Reset stop token after iterations in each helper
2014-01-28 07:45:19 -08:00
Dmitriy Simushev
f82c3a8098 Reset stop token after iterations in each helper 2014-01-28 15:11:17 +00:00
Behrooz Shabani
8c686a924a Merge pull request #40 from Mibew/each_else
Add "else" block to "each" helper
2014-01-23 08:07:48 -08:00
Behrooz Shabani
6e7f5459a3 Merge pull request #39 from Mibew/unless_else
Add "else" block to "unless" helper
2014-01-23 06:01:16 -08:00
Dmitriy Simushev
93884fb26b Add "else" block to "each" helper 2014-01-23 11:44:34 +00:00
Dmitriy Simushev
c5d6a482c1 Add "else" block to "unless" helper 2014-01-23 09:59:13 +00:00
Fzerorubigd
c83e0fbbf7 Merge pull request #38 from ulriklystbaek/patch-1
If the array contains the given key with a null value, the null value should be returned instead of an empty string.
2014-01-21 01:17:10 -08:00
ulriklystbaek
7894899aba Update Context.php
Added author
2014-01-21 09:42:48 +01:00
ulriklystbaek
4e2c869d3b Update Context.php
If the array contains the given key with a null value, the null value should be returned instead of an empty string.
2014-01-21 09:23:54 +01:00
Behrooz Shabani
21b3bf9797 Merge pull request #37 from cgray/master
Refactor of Quoted Literal String Handling and More tests
2014-01-20 09:47:59 -08:00
Chris Gray
4d5e433e61 Fixed formating. 2014-01-20 11:14:53 -06:00
Chris Gray
a44777f52f Added Tests and changed internal representation of quoted string literals from strangely quoted string to an instance of \Handlebars\String 2014-01-20 09:57:16 -06:00
Chris Gray
49dcbb2573 Changed Internal representation of quoted string literals to be an instance of \Handlebars\String instead of strangely quoted string. 2014-01-20 09:04:31 -06:00
Fzerorubigd
ab2d5adbb6 Merge pull request #36 from cgray/master
Add support for .length on arrays
2014-01-20 01:16:19 -08:00
Chris Gray
054f2c75ee Added tests for .length property on arrays 2014-01-19 21:08:38 -06:00
Chris Gray
3603a00ee6 Added support for .length as an alias to count on the current context in Context::_findVariableInContext 2014-01-19 21:07:03 -06:00
Chris Gray
1bbe32b56e Updated docblock 2014-01-19 21:06:22 -06:00
Behrooz Shabani
58c33c1ba7 Merge pull request #35 from cgray/master
Context::get will resolve @key/@index & added Template::parseArguments helper
2014-01-16 23:52:57 -08:00
Chris Gray
415e642351 Fixed to conform to coding standards 2014-01-17 00:46:39 -06:00