summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* async support doesn't require patchinginline-asyncDavid Lord2021-04-103-10/+3
|
* Markup and escape should be imported from markupsafeDavid Lord2021-04-105-5/+5
|
* unify/rename filter and function decoratorsDavid Lord2021-04-104-26/+24
| | | | Use pass_context instead of contextfilter and contextfunction, etc.
* add default parameter to groupbylisongmin2021-04-051-0/+15
|
* Split lines in lexer only by \r\n, \r and \nMatěj Volf2021-04-051-0/+7
| | | | | | | | | | | | Python str.splitlines() splits by more characters[1], which, however, causes problems when keeping these special characters in processed templates is desirable, i.e. these bug reports: #769, #952, #1313. The keep_trailing_newlines logic is reworked because splitlines() removes them already (so they had to be added), while re.split doesn't so they have to be removed. [1] https://docs.python.org/3/library/stdtypes.html#str.splitlines
* NativeEnvironment supports async moderemidebette2021-04-051-0/+24
|
* add Undefined.__aiter__Jafnee2021-04-051-0/+14
|
* Undefined.__contains__ raises UndefinedErrorDavid Parker2021-04-051-0/+1
|
* parse hex, octal, and binary integer literalsAlex Mykyta2021-04-051-0/+7
|
* filters.py: do_indent: ident filter can indent with arbitrary charactersLars Kollstedt2021-04-051-0/+4
| | | | | | | | | | | Allow indention with generic characters, e.g. Tabs. Implemenented the behavior requested in https://github.com/pallets/jinja/pull/1167#issuecomment-612644701 The width param can be string or int, if it is string it's the raw indention e.g. "\t". If it's int it's the number of spaces. In other cases an FilterArgumentError is raised, to avoid confusion.
* add pgettext and npgettextSardorbek Imomaliev2021-04-051-8/+81
|
* add 'is filter' and 'is test' testsDavid Lord2021-04-042-6/+31
| | | | | | This required allowing tests to be decorated with '@environmentfilter'. Tests are essentially the same as filters now, the node, compiler, and environment have been refactored to extract common behavior.
* allow optional use of filter based on existenceAmy2021-04-041-0/+48
|
* more detailed docs about globalsDavid Lord2021-03-311-22/+17
|
* fix bug with cached templates not using new globalsAmy2021-03-301-0/+34
|
* track local loop/block vars for contextfunctionsAmy2021-03-261-0/+98
|
* map filter can use False as defaultBALaka-182021-02-241-0/+8
|
* fix new formatting issuesDavid Lord2021-01-303-4/+4
|
* update urlize docs, clean up codeDavid Lord2021-01-301-2/+2
| | | | | | move regexes near implementation commented verbose regex for http pattern renamed extra_uri_schemes to extra_schemes
* Improve and extend urlizeBebleo2021-01-302-0/+32
|
* deprecate 'with' and 'autoescape' extensionsFawziyahAlebiosu2021-01-292-14/+11
|
* add required attribute to blocksAmy2021-01-292-1/+120
| | | | | required blocks must be overridden at some point, although not necessarily by the direct child template
* detect custom async filters in as_constRichard Gibson2020-10-311-0/+29
|
* Setup mypyTeymour Aldridge2020-07-283-4/+6
| | | | | * Add missing type hints (these are intended as an initial set of type hints, to be added upon and improved later) * Setup MyPy to run as a Github Action
* ignore trim_blocks using '+%}'Amy2020-06-221-0/+118
|
* imported templates can see the current globalsAmy2020-06-221-2/+19
| | | | | | | _get_default_module takes an optional context to indicate that the template is imported. If there are differences between the environment and rendered template globals, a new module is used for the imported template.
* add more tests for import context behaviorAmy2020-06-191-0/+24
|
* remove sandbox._MagicFormatMappingAmy2020-06-151-0/+7
| | | | add test for escape formatter
* Merge branch '2.11.x'David Lord2020-04-132-0/+103
|\
| * native only evals at end of renderDavid Lord2020-04-131-0/+9
| | | | | | | | Co-authored-by: Martin Krizek <mkrizek@redhat.com>
| * Add tests for lstrip whitespace behavior fixPeter Dolak2020-04-131-0/+92
| | | | | | | | | | Also did peformance tests for the previous fix and saw no measurable impact.
* | add changelog and cleanup for pep 451 supportDavid Lord2020-03-301-14/+7
| |
* | Use importlib machinery to fix PEP 451 import hooksAnthony Sottile2020-03-301-0/+41
| |
* | Merge branch '2.11.x'David Lord2020-03-302-0/+29
|\ \ | |/
| * namespace object works in async templatesBart Feenstra2020-03-301-0/+11
| |
| * Fix tokens line number calculation when whitespace stripping is usedAndrey Lisin2020-03-301-0/+18
| |
* | Merge branch '2.11.x'David Lord2020-03-301-0/+15
|\ \ | |/
| * Revert "PackageLoader doesn't depend on setuptools"David Lord2020-03-302-50/+0
| | | | | | | | This reverts commit 4b6077a8c0a0f56bb8dbac37f8f9027130b4091c.
| * AttributeError in undefined message doesn't cause RuntimeErrorDavid Lord2020-03-271-0/+15
| |
* | Merge branch '2.11.x'David Lord2020-02-271-0/+7
|\ \ | |/
| * use soft_str in do_wordcount, to trigger undefinedMatt Martz2020-02-271-0/+7
| |
* | Merge branch '2.11.x'David Lord2020-02-0516-111/+0
|\ \ | |/
| * remove custom pytest marksDavid Lord2020-02-0516-111/+0
| |
* | apply pyupgrade and f-stringsDavid Lord2020-02-0519-261/+229
| |
* | remove more compat codeDavid Lord2020-02-053-36/+24
| |
* | remove _compat moduleDavid Lord2020-02-059-162/+40
| |
* | remove deprecated codeDavid Lord2020-02-052-11/+2
|/
* add changelog and testDavid Lord2020-02-041-0/+19
|
* Added regression test for slicing of attributesArmin Ronacher2020-01-301-0/+4
|
* isolate bytecode cache testsDavid Lord2020-01-261-3/+3
|