Fabien Potencier
c0945a255d
added support for macro name in the endmacro tag
2011-02-17 13:36:40 +01:00
Fabien Potencier
4501984e5d
fixed filter tag
2011-02-05 23:57:22 +01:00
Fabien Potencier
529721d773
fixed wrong usage of loadTemplate()
2011-02-04 12:53:34 +01:00
Martin Hason
46eb49e7e5
fixed functions
2011-02-04 00:55:51 +01:00
Martin Hason
a9127329fb
fixed test covers
2011-02-04 00:55:51 +01:00
Martin Hason
f93a857126
added possibility to customize "display" in the base template class
2011-02-02 14:41:20 +01:00
Fabien Potencier
5b6d255a55
fixed the "length" filter for numbers
2011-01-22 09:12:57 +01:00
Fabien Potencier
64f63bef19
removed coupling between Twig_Node and Twig_Template
...
This coupling was bad as Twig_Node should only be useful
during compilation.
So, the Twig_Node_Expression_GetAttr constants have been moved
to Twig_TemplateInterface.
2011-01-16 07:49:01 +01:00
Fabien Potencier
f44f0cd109
fixed text token with only '0' as content
2011-01-10 19:13:18 +01:00
Fabien Potencier
539e001d0e
added a test for previous commit
2011-01-10 19:09:08 +01:00
Fabien Potencier
ac9e4eec15
fixed the ternary operator
2011-01-10 19:07:04 +01:00
Fabien Potencier
8da408339b
fixed a notice in a unit test
2011-01-07 17:28:00 +01:00
Martin Hason
7e53fbc99e
added support for line number in Twig_Template::getAttribute()
2011-01-07 10:22:59 +01:00
Fabien Potencier
0a82da1d74
removed unneeded wrapping nodes added during parsing
2011-01-03 18:35:07 +01:00
Fabien Potencier
266334042e
removed the grammar and simple token parser code (moved to the Twig Extensions repository)
2011-01-03 12:28:11 +01:00
Fabien Potencier
d2df756df8
added a unit test for previous commit
2011-01-03 08:03:36 +01:00
Leon van der Ree
024b9367eb
improved error messages
2010-12-30 21:23:58 +01:00
Fabien Potencier
2e29145533
fixed ternary operator when used for the default filter
2010-12-30 11:58:28 +01:00
Fabien Potencier
dee2656c9d
changed autoescape first argument from on/off to the standard true/false
2010-12-30 11:20:20 +01:00
Fabien Potencier
a958ada7d3
replaced {% parent %} with {{ parent() }}
2010-12-30 11:20:20 +01:00
Fabien Potencier
6302705a1f
removed 'joined by' support for the 'for' tag as a tag should not output something directly
2010-12-30 11:20:19 +01:00
Arnaud Le Blanc
7794463706
Added sandbox support for functions
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
3615e9a386
Added auto-escaper support for functions
...
Functions' output is escaped by default and functions can declare
themselves "safe" using the "is_safe" option.
2010-12-30 09:31:08 +01:00
Arnaud Le Blanc
c225a5bed9
Handle functions like filters
...
Functions are not global variables anymore. They are resolved at
compile time, and Twig_Function objects are instanciated only when
compiling.
2010-12-30 09:31:08 +01:00
Fabien Potencier
d9e2c42e41
renamed Template::getParentBlock() and getBlock() to diplayParentBlock() and displayBlock(), which is semantically more correct
2010-12-30 09:31:08 +01:00
nikic
9dcf64e386
fix Exception documentation, remove use of Twig_SyntaxError
2010-12-23 12:31:10 +01:00
nikic
6d030c266a
disallow {% set %}{% endset %}
2010-12-22 18:04:45 +01:00
nikic
648c843523
TokenStream changes:
...
* remove unused look() and rewind()
* do not shift tokens, but increase a pointer
2010-12-22 11:51:22 +01:00
Fabien Potencier
1467586430
added some unit tests for previous commit
2010-12-20 19:05:45 +01:00
Fabien Potencier
b1b173f167
converted the cycle filter to a function
2010-12-20 08:46:29 +01:00
Fabien Potencier
47a73476e0
converted the constant filter to a function
2010-12-20 08:43:27 +01:00
Fabien Potencier
8fe302bb3e
converted the range filter to a function
2010-12-20 08:36:03 +01:00
Fabien Potencier
508a241179
forced functions to have fn_ as a prefix to avoid name clashes between functions and variables
2010-12-19 22:24:10 +01:00
Fabien Potencier
afa47bd9a4
added global variables
2010-12-19 19:50:03 +01:00
Fabien Potencier
7fc5927721
made macro return their value instead of echoing directly
2010-12-19 19:50:03 +01:00
Fabien Potencier
9d77cf2254
added from tag
2010-12-19 19:50:00 +01:00
Fabien Potencier
1621435b89
added support for functions
2010-12-19 19:48:02 +01:00
Fabien Potencier
eedce6617e
added an exception when a macro uses a reserved name
2010-12-18 13:15:34 +01:00
Fabien Potencier
0d424bff0d
added the empty test
2010-12-18 11:53:55 +01:00
nikic
dfa0cb91dd
some improvements to for tag compiler
2010-12-18 09:04:23 +01:00
Fabien Potencier
b792382126
added the merge filter
2010-12-16 08:10:41 +01:00
Fabien Potencier
2e55141431
moved the i18n extension to the Twig Extensions repository
2010-12-15 08:32:25 +01:00
Fabien Potencier
9e5b2becf4
made some tweak to the security check for the filesystem loader
2010-12-14 17:24:03 +01:00
Fabien Potencier
3c01290c66
fixed usage of operators as method names (like is, in, and not)
2010-12-14 15:20:49 +01:00
Fabien Potencier
2e08bd705c
changed the order of execution for node visitors
2010-12-14 15:09:27 +01:00
Fabien Potencier
efdcb8c6f4
fixed security check in filesystem loader
2010-12-14 14:36:45 +01:00
Fabien Potencier
090270a509
added some unit tests for the filesystem loader
2010-12-14 14:28:47 +01:00
Fabien Potencier
e0ea4a962a
fixed default() filter behavior when used with strict_variables set to on
2010-12-14 14:27:28 +01:00
Fabien Potencier
28f4cb749e
tweaked last commit
2010-12-14 11:50:47 +01:00
Mark Story
339eb082ed
Adding Twig_Environment::clearCacheFiles() to clear cache files that twig makes.
...
Refactoring test cases in previous commit. Adding more tests for clearing cache files.
Fixes #192
2010-12-14 11:48:33 +01:00