2445 Commits

Author SHA1 Message Date
Guillaume Gomez
a5b43c0aa2 Fix unique filter implementation 2025-04-22 23:36:56 +02:00
Guillaume Gomez
7fccbdf1d7 Remove usage of nextest 2025-04-22 11:34:55 +02:00
Guillaume Gomez
6a16256f24 Fix new clippy lints 2025-04-22 11:34:55 +02:00
Guillaume Gomez
04a4d5b020 Update MSRV to 1.83 2025-04-22 11:34:55 +02:00
Guillaume Gomez
d2a788a740 Add doc about unique filter 2025-04-22 11:34:55 +02:00
Guillaume Gomez
d0d23cad0b Add unique filter 2025-04-22 11:34:55 +02:00
Guillaume Gomez
6f912abee6 Move FastWritable into askama root 2025-04-22 11:33:57 +02:00
Guillaume Gomez
7c5deda4c1 Rename pluralize arguments into singular and plural 2025-04-21 23:11:24 +02:00
René Kijewski
6cea91a9b5 Update book page about filters 2025-04-21 23:11:24 +02:00
René Kijewski
b402936db3 generator: add named arguments for filters 2025-04-21 23:11:24 +02:00
René Kijewski
6f8de0ca84 generator: fix test for filters that need alloc 2025-04-21 23:11:24 +02:00
René Kijewski
4be302338a generator: do argument coercion for |truncate / |center
Don't simply pass any arguments to the filter. The error message won't
be useful otherwise. Also ensure that the argument is a `usize`.
2025-04-21 23:11:24 +02:00
René Kijewski
de9d6b7d0e generator: BUILTIN_FILTERS_NEED_ALLOC should check built-in filters 2025-04-21 23:11:24 +02:00
René Kijewski
4fe13a0053 generator: add missing lifetimes 2025-04-21 23:11:24 +02:00
René Kijewski
9f9a7dcf43 generator: remove leading _ from method names 2025-04-21 23:11:24 +02:00
René Kijewski
74cb9917a0 generator: move filters into their own file 2025-04-21 23:11:24 +02:00
René Kijewski
8fd58a0656 generator: copy expr.rs to filter.rs to make the next diff more readable 2025-04-21 23:11:24 +02:00
Guillaume Gomez
12db32bd2d
Merge pull request #413 from Kijewski/pr-throughput
Add throughput to derive benchmark
2025-04-21 11:31:26 +02:00
René Kijewski
704a33beda Add throughput to derive benchmark 2025-04-20 23:55:03 +02:00
Guillaume Gomez
4c0398ad67
Merge pull request #407 from Kijewski/pr-book-fast-writable
book: add page about `FastWritable`
2025-04-20 12:40:36 +02:00
Guillaume Gomez
7cb3ac0879
Merge pull request #410 from Kijewski/pr-fix-rtd
Update to more current rust version on readthedocs
2025-04-20 11:45:48 +02:00
René Kijewski
72c46f452f Update to more current rust version on readthedocs
Our documentation needs nightly features `doc_cfg`, `doc_auto_cfg` to
build. Instead of using the nightly channel, which is not available on
readthedocs.org, we opt in to nightly features by setting the
environment variable `RUSTC_BOOTSTRAP` to `1`. This gives on unstable
features in a stable channel.

Our dependency `proc-macro2` tests if opting-in to unstable feature is
possible, and if so, it expects that it runs on a quite recent `nightly`
release. The newest rust version that is available out-of-the-box on
readthedocs is rust 1.82, which is not *that* recent anymore, being
released on 2024-08-30.

This PR makes use of the readly configured tool `asdf` to select a more
recent rust version semi-manually.
2025-04-19 23:30:26 +02:00
René Kijewski
94fddd4df5 book: add page about FastWritable 2025-04-19 22:09:28 +02:00
René Kijewski
7881bc131b Implement first and blank arguments for |indent 2025-04-17 15:07:21 +02:00
René Kijewski
ba33974996 Let |indent use AsIndent 2025-04-17 15:07:21 +02:00
Guillaume Gomez
2c1e86e410
Merge pull request #397 from Kijewski/pr-fast-writable-values
Pass variables to sub-templates more reliably even if indirectly
2025-04-17 11:41:54 +02:00
René Kijewski
c6d45e1cdc Always supply values to custom filters 2025-04-15 17:15:47 +02:00
René Kijewski
f7fc39d138 Implement |wordcount filter with access to runtime values 2025-04-15 13:24:19 +02:00
René Kijewski
22648acf08 book: how to access runtime values in custom filters 2025-04-15 13:24:19 +02:00
René Kijewski
20af543610 Pass values through alloc filters, too 2025-04-15 13:24:18 +02:00
René Kijewski
d6bf966048 Pass variables to sub-templates more reliably even if indirectly 2025-04-15 13:13:35 +02:00
Guillaume Gomez
4a17df55b5 Update variable initialization rule docs 2025-04-12 21:52:14 +02:00
Guillaume Gomez
ddfdd20855 Do not put question mark initialization expressions behind a reference 2025-04-12 21:52:14 +02:00
René Kijewski
7727d4032b generator: move manifest_root() call into Config::new() 2025-04-11 11:13:35 +02:00
strickczq
2437a573c7 fix #394 2025-04-11 11:13:35 +02:00
Guillaume Gomez
c76d1a2563 Describe declaration/ownership when creating a new variable 2025-04-11 07:19:59 +02:00
Guillaume Gomez
8081d717d3 If using local variable as value when creating a new variable, do not put it behind a reference 2025-04-11 07:19:59 +02:00
Guillaume Gomez
5253e7cc41 Add another example for tuple for runtime values 2025-04-10 11:16:25 +02:00
Guillaume Gomez
4af7a13cbd Fix runtime error doc 2025-04-10 11:16:25 +02:00
Guillaume Gomez
20149db16f Implement Values on tuple 2025-04-10 11:16:25 +02:00
Guillaume Gomez
6e987eb50d
Merge pull request #385 from GuillaumeGomez/track-config-files
Track config files
2025-04-01 11:23:29 +02:00
René Kijewski
dabb537170 Add config tracking test 2025-04-01 08:33:17 +02:00
René Kijewski
8344828578 Move ConfigKey::full_config_path into Config 2025-04-01 08:20:40 +02:00
Guillaume Gomez
d3f0947d11 Track config files 2025-03-31 22:41:49 +02:00
Guillaume Gomez
aa5e200b10
Merge pull request #384 from Kijewski/pr-derive
`askama_derive` accidentally exposed as a feature
2025-03-31 21:54:49 +02:00
René Kijewski
68fbf93d99 askama_derive accidentally exposed as a feature
If you don't use an optional dependency at least once with `dep:…` in a
feature, it automatically, implicitly becomes a feature flag. The
`dep:` prefix was missing from `askama_derive` for the `derive` feature.
2025-03-31 21:31:56 +02:00
René Kijewski
697862a76c Bump version number to 0.13.0 v0.13.0 2025-03-27 17:22:37 +01:00
René Kijewski
661c38cdc6 ci: fix up to #380 2025-03-23 23:52:04 +01:00
René Kijewski
35a1be81af ci: ensure that github CI config is safe using zizmor
Zizmor: <https://woodruffw.github.io/zizmor/>
2025-03-23 23:25:08 +01:00
Paolo Barbolini
1df437ec94 Fix minimum supported syn version 2025-03-22 12:07:33 +01:00