larros
df58dcb49d
Add support for importing template files with macros ( #51 )
...
* Fix review comments for macro imports
2017-09-26 10:02:44 +02:00
Lars Erik Rosengren
4e919e4753
Add support for tuple indexing in templates
2017-09-10 20:15:15 +02:00
Dirkjan Ochtman
7c29bf765f
Extend escaping according to OWASP recommendations
2017-09-07 20:42:55 +02:00
Dirkjan Ochtman
e559ed4210
Move JSON test into filters test module
2017-09-07 20:42:54 +02:00
Dirkjan Ochtman
07e9b307c8
Move escaping tests into a separate module
2017-09-07 20:42:54 +02:00
Dirkjan Ochtman
92d93e0e8b
Add test case for inferred escape mode
2017-09-07 20:42:54 +02:00
Dirkjan Ochtman
ee9db1dbf4
Make ext attribute mandatory for source-specified templates
2017-09-07 20:42:54 +02:00
Dirkjan Ochtman
7203fac07c
Add some tests for escaping functionality
2017-09-05 20:34:32 +02:00
Dirkjan Ochtman
32a9dd5f2e
Moved precedence test into operators module
2017-09-04 20:31:28 +02:00
Lars Erik Rosengren
986535fc95
Changed implementation of precedence rules
...
This implementation resolves djc/askama#44 by changing the precedence
implementation.
The previous solution was very slow because it had to try to parse
all combinations of precedence layers leading to 2^9 iterations for each
expr_any. This is solved by reusing the left operand instead of reparsing
it when the operator isn't found.
This implementation also solves another related issue that expressions
with multiple operators couldn't be parsed, for example {{1 * 2 * 3}}.
This is handled by using expr_any for the right operand instead of only
using higher level precedence layers.
2017-09-03 19:08:53 +02:00
defyrlt
7d2d7718aa
Add join
filter & tests for it
2017-09-02 13:34:52 +02:00
Bastien Orivel
aeac47cee0
Add test for parent default block implementations
2017-08-25 13:29:34 +02:00
Dirkjan Ochtman
201a2cb2a2
Simplify Rocket test slightly
2017-08-24 20:47:24 +02:00
Dirkjan Ochtman
c8b14c6d0d
Add test case for user-defined filters
2017-08-24 20:22:32 +02:00
Dirkjan Ochtman
e030066106
Add test for Rocket support
2017-08-23 20:55:45 +02:00
Dirkjan Ochtman
40775d8c88
Add test for Iron support
2017-08-23 20:43:11 +02:00
Dirkjan Ochtman
57a10a789e
Forgot to remove debugging cruft, again
2017-08-23 12:43:53 +02:00
Anthony Nowell
2d6785b714
Adding optional json filter
2017-08-23 12:40:14 +02:00
Dirkjan Ochtman
d0a3d51dcd
Add test for basic macro use
2017-08-22 20:22:33 +02:00
Dirkjan Ochtman
4f4b5a3a65
Change one test case to use source attribute
2017-08-16 21:04:52 +02:00
Dirkjan Ochtman
d7ac0825e0
Add test for variable declaration
2017-08-16 12:51:11 +02:00
Dirkjan Ochtman
fb11c175b2
Add test for let blocks
2017-08-15 07:47:02 +02:00
Dirkjan Ochtman
cd685eefb4
Disable debug output for example by default
2017-08-10 12:52:31 +02:00
Dirkjan Ochtman
e8c47b7135
Add README example as a test case
2017-08-10 12:37:01 +02:00
Dirkjan Ochtman
cece25b0be
Implement Display for all Templates
2017-08-10 09:51:48 +02:00
Dirkjan Ochtman
1e0ee705a8
Propagate format errors and rename render_to()
to render_into()
2017-08-10 09:27:33 +02:00
Dirkjan Ochtman
b7446b744a
Add test for deref implementation (see #28 )
2017-08-08 12:36:29 +02:00
Dirkjan Ochtman
549d0ec3c6
Add test for include blocks (see #25 )
2017-08-04 13:21:55 +02:00
Dirkjan Ochtman
8ff2e316c0
Merge changes
2017-08-02 20:59:30 +02:00
Dirkjan Ochtman
85ed025368
Add test that starts with a single brace (see #24 )
2017-08-02 20:49:08 +02:00
Dirkjan Ochtman
ce84543b69
Add test for basic chained attributes
2017-05-26 11:45:27 +02:00
Dirkjan Ochtman
ed89e5f027
Remove type parameter defaults from impls ( fixes #12 )
2017-03-08 20:14:55 +01:00
Dirkjan Ochtman
f71b2f0323
Add test for type parameters and where clauses (see #9 )
2017-03-08 19:55:47 +01:00
Dirkjan Ochtman
4c8a5b5104
Remove debugging cruft from test_nested_for
2017-03-07 21:34:50 +01:00
Dirkjan Ochtman
0eeb5d1b2d
Add test for nested loops and loops over slices (see #6 , #7 , #9 )
2017-03-07 21:00:44 +01:00
Dirkjan Ochtman
a0a3e4018c
Create separate test module for loops
2017-03-07 07:39:42 +01:00
Dirkjan Ochtman
664398b225
Hide askama_derive dependency inside askama ( fixes #2 )
2017-03-06 22:40:04 +01:00
Dirkjan Ochtman
71f9f51d2a
Add test for comments
2017-03-03 20:43:12 +01:00
Dirkjan Ochtman
aa98f61fa7
Discard trailing newlines from templates by default
...
This matches Jinja's behavior, and seems sensible.
2017-03-03 16:44:54 +01:00
Dirkjan Ochtman
a407cd477b
Add basic test for loop variables
2017-02-19 14:19:11 +01:00
Dirkjan Ochtman
8b5d59af62
Add test for handling Option types (with method calls)
2017-02-18 16:04:27 +01:00
Dirkjan Ochtman
f2ea1408cf
Add test for format filter
2017-02-18 14:02:59 +01:00
Dirkjan Ochtman
e449140e0a
Add test for attribute support
2017-02-18 13:16:17 +01:00
Dirkjan Ochtman
b84a1242c4
Add tests for more binary operators
2017-02-17 14:59:04 +01:00
Dirkjan Ochtman
1121af3dd0
Split comparison tests from other operators
2017-02-17 14:34:24 +01:00
Dirkjan Ochtman
ca5bfc1116
Implement support for mul, div, mod operators
2017-02-13 22:00:35 +01:00
Dirkjan Ochtman
a6b4f305e9
Rename comparison tests to be about any operators
2017-02-13 21:57:29 +01:00
Dirkjan Ochtman
3b70780340
Test support for variables in inherited templates
2017-02-12 20:42:43 +01:00
Dirkjan Ochtman
c74e9e8971
Explicitly pass trait implementation to top-level base template method
...
This requires a base template struct to be a member of the derived template's
context, but allows the base template to access base template fields.
2017-02-12 20:38:14 +01:00
Dirkjan Ochtman
4691cf3559
Add test for using base template directly
2017-02-12 12:06:18 +01:00