summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * minor: fix typo in docstringDaniel Hahler2020-01-061-1/+1
|/
* Merge pull request #1115 from myii/patch-2David Lord2019-12-081-1/+1
|\ | | | | fix typo in templates.rst, "hat" to "that"
| * fix(templates.rst): fix typo (`hat` => `that`)Imran Iqbal2019-12-081-1/+1
|/
* Merge pull request #1114 from pallets/import-undefinedDavid Lord2019-12-055-25/+95
|\ | | | | handle Undefined in get/select_template
| * handle Undefined in get/select_templateDavid Lord2019-12-055-25/+95
|/
* Merge pull request #1113 from pallets/namespace-loaderDavid Lord2019-12-052-10/+43
|\ | | | | PackageLoader understands namespace packages
| * PackageLoader understands namespace packagesDavid Lord2019-12-052-10/+43
|/
* Merge pull request #1112 from pallets/include-syntax-error-sourceDavid Lord2019-12-033-10/+25
|\ | | | | TemplateSyntaxError from included template has source
| * TemplateSyntaxError from included template has sourceDavid Lord2019-12-033-10/+25
|/
* Merge pull request #1111 from pallets/optimizer-nodesDavid Lord2019-12-032-16/+18
|\ | | | | apply optimizer to all Expr nodes
| * apply optimizer to all Expr nodesDavid Lord2019-12-032-16/+18
|/
* Merge pull request #861 from OddBloke/contextreference_localsDavid Lord2019-12-024-4/+36
|\ | | | | Add a DerivedContextReference node type
| * add a node for derived context referencesDaniel Watkins2019-12-024-4/+36
|/ | | | | This allows extensions to access locals in the scope from which they were called.
* Merge pull request #1110 from pallets/patch-tracebackDavid Lord2019-12-026-379/+234
|\ | | | | rewrite traceback rewriting support
| * rewrite traceback rewriting supportDavid Lord2019-12-026-379/+234
|/ | | | | | | | | | | | | Simplify the `jinja.debug` code. On Python >= 3.7, `tb_next` is directly assignable. On PyPy, use transparent proxies only if support is enabled. For cpython < 3.7, use ctypes to set `tb_next`. Rewrite the ctypes code to use `py_object` and `pythonapi.Py_IncRef`, which seems to avoid crashing on debug builds. On Python 3, a rewritten `TemplateSyntaxError` would retain the frames from the compiler functions for some reason. Clear these so the template source is the last thing in the traceback.
* Merge pull request #1109 from pallets/visit-output-refactorDavid Lord2019-11-205-297/+188
|\ | | | | refactor visit_Output
| * refactor visit_OutputDavid Lord2019-11-205-297/+188
|/ | | | | | | | | | | | * `finalize` is generated once and cached for all nodes. * Extract common behavior for native env. Removed the compiler behavior where groups of nodes would generate a format string. Instead, individual nodes are always yielded. This made rendering 30% faster in the examples, and simplifies the code. It also removes the issue where Python would report either the first or last line of the multi-line format expression, messing up the traceback line number mapping.
* Merge pull request #1105 from areebbeigh/issue-1102David Lord2019-11-203-8/+41
|\ | | | | nodes.py: Return on first false in Compare() expr
| * add test and changelog for constant comparison foldingDavid Lord2019-11-203-8/+39
| |
| * return on first false when folding Compare nodeareebbeigh2019-11-201-0/+2
|/
* Merge pull request #1108 from captainmalloc/runtime_callsDavid Lord2019-11-203-6/+4
|\ | | | | Use 'callable' instead of typechecking for runtime calls ctx/env injection
| * use 'callable' instead of typechecking to inject contextAdriano Scoditti2019-11-203-6/+4
|/
* Merge pull request #1101 from pallets/refactor-loop-contextDavid Lord2019-11-086-176/+273
|\ | | | | don't prefetch next item in loop context
| * async templates await attribute accessrefactor-loop-contextDavid Lord2019-11-074-25/+49
| |
| * don't prefetch next item in loop contextDavid Lord2019-11-073-151/+224
|/
* Merge pull request #1098 from pallets/urlencode-docsDavid Lord2019-11-043-38/+61
|\ | | | | clarify quoting behavior of urlencode filter
| * clarify quoting behavior of urlencode filterDavid Lord2019-11-043-38/+61
|/
* Merge pull request #829 from aogier/feature/550-hyphens-wordwrapDavid Lord2019-11-012-1/+17
|\ | | | | Exposing Textwrapper break_on_hyphens option to wordwrap filter
| * add break_on_hyphens parameter to wordwrap filterAlessandro -oggei- Ogier2019-11-012-1/+17
|/
* Merge pull request #766 from fheinle/palletes_jinja_175-wordwrapDavid Lord2019-11-013-15/+45
|\ | | | | Let wordwrap filter respect existing newlines
| * reformat, doc, and test for wordwrapDavid Lord2019-11-013-28/+44
| |
| * let wordwrap filter respect existing newlinesFlorian Heinle2019-11-011-3/+17
|/ | | | | | | | | | | textwrap.wrap() has unexpected behaviour where when wrapping multiple paragraphs it will not consider existing newlines. I.e. when your first paragraph ends on col 75, the next paragraph will be wrapped on col 5 already. This patch is wrapping each line individually and combining it back together.
* Merge pull request #673 from MrSenko/get_corresponding_lineno_tracebackDavid Lord2019-11-012-2/+8
|\ | | | | handle template.get_corresponding_lineno() for lines without debug info
| * Return empty list when debug_info is empty stringMr. Senko2017-01-291-2/+4
| |
| * Add test for Template.get_corresponding_lineno()Mr. Senko2017-01-291-0/+4
| | | | | | | | this currently breaks with an exception inside Jinja
* | Merge pull request #1096 from pallets/compile-encodingDavid Lord2019-10-282-7/+9
|\ \ | | | | | | compile writes utf8
| * | compile writes utf8David Lord2019-10-282-7/+9
|/ /
* | Merge pull request #1095 from pallets/native-template-envDavid Lord2019-10-284-135/+153
|\ \ | | | | | | creating a NativeTemplate creates a NativeEnvironment
| * | creating a NativeTemplate creates a NativeEnvironmentnative-template-envDavid Lord2019-10-284-135/+153
| | |
* | | Merge pull request #1093 from cclauss/print-functionDavid Lord2019-10-2812-11/+22
|\ \ \ | |/ / |/| | Use print() function in both Python2 and Python 3
| * | Use print() function in both Python2 and Python 3cclauss2019-10-2712-11/+22
|/ /
* | Merge pull request #1090 from pallets/lrucache-copyDavid Lord2019-10-243-3/+17
|\ \ | | | | | | LRUCache.copy's queue methods point to the correct queue
| * | don't create a third queueDavid Lord2019-10-243-5/+5
| | |
| * | LRUCache.copy initializes queue methodsRyan Siemens2019-10-243-1/+15
|/ /
* | use "Jinja" instead of "Jinja2"David Lord2019-10-233-6/+6
| |
* | Merge pull request #1087 from pallets/jinja-nameDavid Lord2019-10-2330-160/+158
|\ \ | | | | | | use "Jinja" instead of "Jinja2"
| * | use "Jinja" instead of "Jinja2"David Lord2019-10-2330-160/+158
|/ /
* | Merge pull request #1086 from pallets/native-string-literalDavid Lord2019-10-223-18/+52
|\ \ | | | | | | preserve quotes between nodes in native env
| * | preserve quotes between nodes in native envDavid Lord2019-10-223-18/+52
|/ /
* | Merge pull request #1064 from alexwlchan/support-pathlibDavid Lord2019-10-216-17/+136
|\ \ | | | | | | Support paths created with pathlib in FileSystemLoader and ModuleLoader