Commit Graph

112 Commits

Author SHA1 Message Date
David Lord
6aeab5d1da
Merge branch 'stable' 2024-12-21 10:47:46 -08:00
Vitor Buxbaum
7d023e5a86
Fix typo on filter name 2024-12-18 08:52:06 -08:00
Ronan Amicel
d680a95932
Fix nl2br example in documentation (#2054) 2024-12-07 11:04:28 -05:00
Thomas Grainger
5bc613ec45
use asyncio.run 2024-05-11 13:41:46 -07:00
Sébastien DIDIER
5e636989f0 Fix typo in docs/api/#custom-tests 2022-07-18 15:35:31 +02:00
David Lord
a98d482186
clean up faq, move technical discussions 2022-03-12 08:26:06 -08:00
David Lord
896a62135b
Merge branch '3.0.x' 2021-12-26 07:48:45 -07:00
Ben Zinberg
76cd591975 Typo in docs (trailing backtick)
At least, I _think_ this is a typo? 🙂
2021-12-24 18:22:57 -05:00
David Lord
c6caa4c5b0
remove deprecated template function decorators 2021-11-10 11:07:04 -08:00
David Lord
7d0b7accff
use asyncio.run 2021-05-18 13:22:46 -07:00
David Lord
912e59d51f
deprecate legacy resolve mode 2021-04-11 23:53:59 -07:00
David Lord
aafe94d97a
Markup and escape should be imported from markupsafe 2021-04-10 10:22:24 -07:00
David Lord
788d8bc172
unify/rename filter and function decorators
Use pass_context instead of contextfilter and contextfunction, etc.
2021-04-10 10:14:42 -07:00
David Lord
6c733602ac
add 'is filter' and 'is test' tests
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.
2021-04-04 17:20:23 -07:00
David Lord
38e45fead3
more detailed docs about globals 2021-03-31 16:09:51 -07:00
David Lord
076d380361
Merge branch '2.11.x' 2021-01-31 08:48:44 -08:00
David Lord
be83e7e06c
update urlize docs, clean up code
move regexes near implementation
commented verbose regex for http pattern
renamed extra_uri_schemes to extra_schemes
2021-01-30 13:38:56 -08:00
Bebleo
d504e1d1e2
Improve and extend urlize 2021-01-30 06:25:03 -08:00
David Lord
2408a55bbe
update package and filesystem loader docs 2020-05-23 12:21:44 -07:00
Mark Hansen
7db7d336ba
api.rst: bugfix in docs, import PackageLoader
It's used two lines below.
2020-05-16 16:04:48 +10:00
David Lord
c074fd5ecb
Merge branch '2.11.x' 2020-03-30 10:54:57 -07:00
ldealmei
930dd3d977
Add link to template designer documentation
For those who were actually looking for the template design documentation putting a link directly to it might prevent them to have to google for it. When on the API page, there is no direct way to find the template design documentation. Hope this can help others.
2020-02-28 08:00:07 -08:00
David Lord
45a76a3794
Merge branch '2.11.x' 2020-02-27 11:16:01 -08:00
David Lord
2f61f69de1
rewrite async discussion 2020-02-08 11:08:05 -08:00
David Brochart
7c1b535c35
Fix async doc 2020-02-08 11:08:04 -08:00
David Lord
2a8515d2e5
apply pyupgrade and f-strings 2020-02-05 08:44:15 -08:00
David Lord
f28b25ea62
remove Python 2 from docs 2020-02-05 08:37:40 -08:00
David Lord
4a59ac9514
Revert "rename imports to jinja"
This reverts commit 1167525b73.
2020-01-26 21:12:52 -08:00
David Lord
1167525b73
rename imports to jinja 2020-01-10 15:30:16 -08:00
David Lord
57626a000a
use "Jinja" instead of "Jinja2" 2019-10-23 12:35:53 -07:00
David Lord
9550dc85ff
Merge branch '2.10.x' 2019-07-26 15:21:16 -07:00
David Lord
288dd42f57
Merge branch '2.9.x' into docs 2019-07-26 15:01:03 -07:00
David Lord
06696563d7
fix linkcheck issues 2019-07-26 12:12:41 -07:00
David Lord
f77b09d998
modernize docs config, use pallets-sphinx-themes 2019-07-26 11:41:08 -07:00
David Lord
13cc9f410c
Merge branch '2.10.x' 2019-07-20 14:03:04 -07:00
jab
a811d86acc Fix "duplicate object description of jinja2" warning
Follow suggestion to use :noindex: for the instance in api."
2019-06-05 23:04:36 -04:00
Deepak Amin
4965facc02 docs: Python3-ize the examples
This commit updates the examples to conform to Python 3 instead
of Python 2, as Python 3 is more acceptable these days.
2019-05-31 16:12:33 -04:00
Étienne Pelletier
19133d4059 Add ChainableUndefined allowing getattr & getitem (#997)
* Add ChainableUndefined allowing getattr & getitem

Allows using default values with chains of items or attributes that may
contain undefined values without raising a jinja2.exceptions.UndefinedError.

>>> import jinja2
>>> env = jinja2.Environment(undefined=jinja2.ChainableUndefined)
>>> env.from_string("{{ foo.bar['baz'] | default('val') }}").render()
'val'

* Remove class decorator from ChainableUndefined
2019-05-08 10:47:33 -04:00
Ruben Garcia
a9d557f6fa Fix typo 2019-02-08 11:18:06 +01:00
Mark Amery
9e410c7b04 Fix broken nl2br filter example
This example attempts to handle both Windows-style and Unix-style line endings, but does it wrong; as noted at https://stackoverflow.com/q/12521127/1709587, the regex here will match a single \r\n as if it were a double line-break, which results in all single Windows-style line-breaks getting converted into <p> breaks instead of <br> breaks as intended.

This patch fixes that by applying Alan Moore's proposed fix from https://stackoverflow.com/a/12521544/1709587 of using a negative lookahead so that a \r cannot be counted as a line break if it is followed by a \n (while still allowing the \r\n combination to count as a line break).
2018-11-25 17:49:22 +00:00
Jon Dufresne
148b6fb3c5 Trim trailing white space throughout the project
Many editors clean up trailing white space on save. By removing it all
in one go, it helps keep future diffs cleaner by avoiding spurious white
space changes on unrelated lines.
2018-08-29 20:58:03 -07:00
Frank Sachsenheim
d0f8811d79
Fixes 'awaitable' typo in api.rst 2018-05-11 21:25:22 +02:00
nwalsh1995
65337f8a78
Fix small typo 2018-04-17 14:55:13 -07:00
Unknown
778ccb22e9 Trivial typos
Most non-user facing.
2017-11-08 20:02:28 -05:00
Adrian Moennich
e605ff1a0b Add support for {% trans trimmed ... %}
Same behavior as in Django: All linebreaks and the whitespace
surrounding linebreaks are replaced with a single space.

closes #504
2017-07-03 16:37:45 +02:00
Adrian Moennich
cc1d287b2b Add docs for namespace functionality 2017-06-24 10:56:54 +02:00
Jon Dufresne
3b1ddea8ac In documentation, prefer https over http when available 2017-04-09 15:21:05 -07:00
Daniel van Flymen
96f52e6a8f Fix typo (#687) 2017-03-01 20:10:34 +01:00
Armin Ronacher
fb47dfac60 Allow to reconfigure the default for truncate leeway
Refs #610
2017-01-10 09:21:15 +01:00
Armin Ronacher
b81a8a3e37 Updated docs on autoescaping and made select_autoescape case insensitive 2017-01-07 16:13:39 +01:00