summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* async support doesn't require patchinginline-asyncDavid Lord2021-04-109-593/+453
|
* Markup and escape should be imported from markupsafeDavid Lord2021-04-102-11/+32
|
* unify/rename filter and function decoratorsDavid Lord2021-04-1010-157/+286
| | | | Use pass_context instead of contextfilter and contextfunction, etc.
* extract common code for import/from nodesDavid Lord2021-04-101-20/+13
|
* refactor compiler environment.is_async checksangelafrentz2021-04-091-25/+21
|
* add default parameter to groupbylisongmin2021-04-052-3/+19
|
* Fix map documentationSam Bull2021-04-051-1/+1
|
* update wording on dictionary default orderingjeff2021-04-051-3/+2
|
* Split lines in lexer only by \r\n, \r and \nMatěj Volf2021-04-051-5/+10
| | | | | | | | | | | | 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/+14
|
* add Undefined.__aiter__Jafnee2021-04-051-0/+4
|
* Undefined.__contains__ raises UndefinedErrorDavid Parker2021-04-051-1/+1
|
* parse hex, octal, and binary integer literalsAlex Mykyta2021-04-051-2/+17
|
* filters.py: do_indent: ident filter can indent with arbitrary charactersLars Kollstedt2021-04-051-3/+12
| | | | | | | | | | | 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 type annotations to filters and testsDavid Lord2021-04-056-206/+509
|
* add pgettext and npgettextSardorbek Imomaliev2021-04-051-6/+57
|
* add 'is filter' and 'is test' testsDavid Lord2021-04-044-97/+211
| | | | | | 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-042-2/+27
|
* more detailed docs about globalsDavid Lord2021-03-311-41/+80
|
* fix bug with cached templates not using new globalsAmy2021-03-301-0/+10
|
* track local loop/block vars for contextfunctionsAmy2021-03-262-4/+46
|
* allow scoped blocks to access loop varsAmy2021-03-261-3/+6
|
* map filter can use False as defaultBALaka-182021-02-241-1/+1
|
* consistent typing configDavid Lord2021-02-246-11/+16
|
* update tojson docsDavid Lord2021-02-012-46/+46
|
* Merge branch '2.11.x'David Lord2021-01-312-9/+4
|\
| * release version 2.11.32.11.32.11.xDavid Lord2021-01-311-1/+1
| |
| * speed up urlize matchingDavid Lord2021-01-311-51/+56
| |
| * do_dictsort: update example ready to copy/pasteMark Hansen2020-05-161-4/+4
| | | | | | When iterating over a dict you usually want to pull out the keys and values.
* | fix new formatting issuesDavid Lord2021-01-303-16/+23
| |
* | refactor urlize functionDavid Lord2021-01-301-63/+71
| | | | | | | | | | | | | | | | | | don't try other url types if one already matched no-op function if trim is not enabled avoid backtracking when matching trailing punctuation match head and tail punctuation separately don't scan for unbalanced parentheses more than necessary ensure email domain starts and ends with a word character
* | update urlize docs, clean up codeDavid Lord2021-01-303-71/+120
| | | | | | | | | | | | move regexes near implementation commented verbose regex for http pattern renamed extra_uri_schemes to extra_schemes
* | Improve and extend urlizeBebleo2021-01-303-27/+93
| |
* | deprecate 'with' and 'autoescape' extensionsFawziyahAlebiosu2021-01-291-2/+17
| |
* | add required attribute to blocksAmy2021-01-293-3/+27
| | | | | | | | | | required blocks must be overridden at some point, although not necessarily by the direct child template
* | native_concat: pass only strings to literal_evalMartin Krizek2021-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If there is only single node and it is not a string, there is no point in passing it into ``literal_eval``, just return it immediately. One of the examples where passing a non-string node into ``literal_eval`` would actually cause problems is when the node is ``Undefined``. On Python 3.10 this would cause ``UndefinedError`` instead of just ``Undefined`` being returned. Fixes #1335
* | add 'linetable' to the preserved CodeType attributes (#1334)Thomas Moschny2021-01-191-0/+1
| | | | | | | | | | add 'linetable' to the preserved CodeType attributes co_linetable replaces co_lnotab as part of PEP 626 in Python 3.10.
* | detect custom async filters in as_constRichard Gibson2020-10-311-4/+7
| |
* | Setup mypyTeymour Aldridge2020-07-288-28/+39
| | | | | | | | | | * 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-4/+8
| |
* | imported templates can see the current globalsAmy2020-06-224-7/+27
| | | | | | | | | | | | | | _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.
* | remove sandbox._MagicFormatMappingAmy2020-06-151-32/+0
| | | | | | | | add test for escape formatter
* | update package and filesystem loader docsDavid Lord2020-05-231-12/+17
| |
* | Merge branch '2.11.x'David Lord2020-04-132-30/+15
|\ \ | |/
| * release version 2.11.22.11.2David Lord2020-04-131-1/+1
| |
| * native only evals at end of renderDavid Lord2020-04-131-24/+7
| | | | | | | | Co-authored-by: Martin Krizek <mkrizek@redhat.com>
| * Fix unintended lstrip_blocks behavior. Fixes #1138Peter Dolak2020-04-131-5/+8
| | | | | | | | | | Introduced in #858. Tests will follow, also results of performance testing.
| * Merge tag '2.11.1' into 2.11.xDavid Lord2020-04-081-1/+1
| |\
| | * release version 2.11.12.11.1David Lord2020-01-301-1/+1
| | |
* | | Update oudated CutomLoader code example (#1185)Xinbin Huang2020-04-081-2/+2
| | | | | | | | | py3 for CustomLoader example