Dirkjan Ochtman
2bd1745e99
Add package metadata for new askama_shared crate
2017-09-06 20:07:42 +02:00
Dirkjan Ochtman
27ba9aeca3
Add badge for Gitter chat to README
2017-09-06 20:04:43 +02:00
Dirkjan Ochtman
9c4f37c17e
Decrease coupling with Rocket in generated code
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
0129365d1e
Add documentation on optional features
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
60036152a0
Allow setting an extension with source attributes
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
ddcc0453ba
Make path and source attributes mutually exclusive
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
09514f07ee
Tighten up and expand documentation on variables
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
697f461b04
Cover all template() attribute options
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
832c23bf3a
Slightly extend introduction to creating templates
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
5738ad3cef
Strip documentation intro that duplicates the README
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
2543b34228
Update feature highlights in documentation
2017-09-06 20:03:47 +02:00
Dirkjan Ochtman
aa1d0fb44d
Minor documentation updates
2017-09-06 12:59:33 +02:00
Dirkjan Ochtman
8b195c5157
Bump version number to 0.4.0
2017-09-06 12:59:33 +02:00
Dirkjan Ochtman
042da2f857
Reflow line
2017-09-06 12:59:33 +02:00
Dirkjan Ochtman
634daaecb2
Add and update feature highlights and limitations
2017-09-06 12:59:33 +02:00
Dirkjan Ochtman
3d7084f6af
Add panics during code generation for unsupported cases
2017-09-06 12:59:33 +02:00
Dirkjan Ochtman
d6cc51efa0
Allow includes to use relative paths
2017-09-05 20:39:42 +02:00
Dirkjan Ochtman
4154f4ebf3
Refactor type handling for attribute parameters
2017-09-05 20:37:52 +02:00
Dirkjan Ochtman
7203fac07c
Add some tests for escaping functionality
2017-09-05 20:34:32 +02:00
Dirkjan Ochtman
f02ade3b94
Introduce attribute parameter to disable escaping
2017-09-05 20:34:18 +02:00
Dirkjan Ochtman
84fee0cf89
Move knowledge of what to generate into Generator
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
d526bbfe16
Extract generator::State type to clarify structure
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
baa2081714
Move TemplateInput and related code into separate module
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
cf360ade77
Create new TemplateInput abstraction
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
41a41579ac
Create better abstraction around TemplateMeta type
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
e850b1e805
Pass AST to code generator as reference
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
e7922da671
Stop mutating parsed AST for code generation
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
3c9c4fe026
Refactor code generation for block definitions
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
b65d6c07bd
Refactor handling of macros
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
6911e1d86c
Move tightly coupled code from derive to shared crate
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
6f04a7e154
Raise 500 error instead of unwrapping in Rocket Responder impl
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
ab8f8c1fa5
Remove warning, since BUILT_IN_FILTERS is now in the same module
2017-09-05 19:54:15 +02:00
Dirkjan Ochtman
adda8de2cd
Escape all strings with character entities by default ( fixes #23 )
2017-09-04 20:37:12 +02:00
Dirkjan Ochtman
fdbe45ec60
Move escaping algorithm into a separate module
2017-09-04 20:37:05 +02:00
Dirkjan Ochtman
23279c3bce
Move filter list closer to the actual filters, add docs
2017-09-04 20:31:28 +02:00
Dirkjan Ochtman
32a9dd5f2e
Moved precedence test into operators module
2017-09-04 20:31:28 +02:00
Dirkjan Ochtman
6145cb5a48
Clean up and tighten faster version of expr_prec_layer macro
2017-09-04 20:31:28 +02:00
Dirkjan Ochtman
9a21f5eaa3
Tighten up code for join filter handling
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
defyrlt
b0ea82d87a
Refactor visit_filter
to allow easier customization
2017-09-02 13:34:52 +02:00
Anthony Nowell
2fe5cfa998
Export Error type
2017-08-29 09:28:56 +02:00
Dirkjan Ochtman
9f3b590206
Move most of the code into new askama_shared crate
...
This makes it possible to share code between askama and askama_derive.
2017-08-27 22:10:42 +02:00
Bastien Orivel
aeac47cee0
Add test for parent default block implementations
2017-08-25 13:29:34 +02:00
Dirkjan Ochtman
fc7be3c927
Use block implementations in parent as defaults in trait
2017-08-25 13:23:55 +02:00
defyrlt
42e854809a
Add unwrap()
to the hello world example in README
2017-08-25 07:01:09 +02:00
Dirkjan Ochtman
201a2cb2a2
Simplify Rocket test slightly
2017-08-24 20:47:24 +02:00
Bastien Orivel
5f0ff4726d
Allow {% block name %} {% endblock name %}
...
This makes converting an app from tera to askama easier.
2017-08-24 20:25:35 +02:00
Dirkjan Ochtman
c8b14c6d0d
Add test case for user-defined filters
2017-08-24 20:22:32 +02:00
Dirkjan Ochtman
1c9066f9b4
Add support for user-defined filters
2017-08-24 20:22:23 +02:00