601 Commits

Author SHA1 Message Date
Guillaume Gomez
a577f60d33 Add new custom_ui test suite to allow checking askama warning messages 2025-09-02 15:08:59 +02:00
Guillaume Gomez
034f1676b5 Fix invalid "duplicated block call" warning 2025-09-02 15:08:59 +02:00
René Kijewski
52c4dfd8c3 parser: reject extends below top-level, too 2025-08-25 01:24:25 +02:00
Guillaume Gomez
b744cab2be Emit an error if an extends block doesn't come first in a template 2025-08-24 22:26:17 +02:00
René Kijewski
4025323c8d tests: fix expected output for nightly 2025-08-17 2025-08-19 22:22:46 +02:00
René Kijewski
8c02e48cdb Implement feature "nightly-spans" 2025-08-19 17:41:20 +02:00
René Kijewski
a0d99ba6fc Better spans 2025-08-19 17:41:20 +02:00
René Kijewski
e5189b933d Use Parser::[with_]span() to generate proc_macro::Span 2025-08-19 17:41:20 +02:00
Guillaume Gomez
1f31021632 Fix wrong macro argument parsing 2025-08-17 16:28:45 +02:00
Guillaume Gomez
e8d2391d48 Allow to ignore jinja code example check 2025-08-17 14:59:12 +02:00
Guillaume Gomez
edcaa61fb6 Add new test to check syntax of book examples 2025-08-17 14:59:12 +02:00
Markus Ebner
59a982028e Fix #563: filesizeformat with proper accuracy 2025-08-13 12:26:25 +02:00
Guillaume Gomez
e8572f4580 Fix invalid handling of paths starting with :: 2025-08-13 11:20:49 +02:00
Guillaume Gomez
885e0f7de1 Fix wrong span context for askama variables 2025-08-12 14:54:51 +02:00
René Kijewski
1014b975cd Fix new clippy warnings 2025-08-07 20:55:28 +02:00
René Kijewski
98ad5d5b3f parser: better messages for (group) 2025-08-07 20:48:15 +02:00
René Kijewski
c0d6f0f0fc parser: a little better spans 2025-08-07 20:39:38 +02:00
René Kijewski
329771152d parser: use LocatingSlice<&str> instead of &str
This will enable better span getting in subsequent PRs.
2025-08-07 18:41:51 +02:00
René Kijewski
693f86d1c4 derive: don't use format_args! for code formatting
* No need to manually escape raw identifiers
* Allow a few warnings
2025-08-06 19:11:26 +02:00
Guillaume Gomez
80a4af7f2d Generate a TokenStream rather than a String 2025-08-06 19:11:26 +02:00
René Kijewski
1f3c926c58 parser: r#self is not a valid raw identifier in macro calls
It's not a valid raw identifier anywhere, actually, but the other cases
(in a path, as a field name, as a macro name) were already handled.

Resolves <https://issues.oss-fuzz.com/issues/435218013>.
2025-07-31 18:46:35 +02:00
René Kijewski
d670d9b91c parser: fail on unterminated byte literal
Resolves <https://issues.oss-fuzz.com/issues/433650278>.

Also, I noticed that an Unicode escape in a byte literal, e.g.
`b'\u{42}'`, was accepted when it should not have been.
2025-07-28 21:56:40 +02:00
dependabot[bot]
f0a1fa467d build(deps): update criterion requirement from 0.6 to 0.7
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.6.0...0.7.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-version: 0.7.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-25 23:36:35 +02:00
Markus Ebner
48d5dba024
Fix #531: Allow named arguments in expr macro calls 2025-07-22 12:33:26 +02:00
Markus Ebner
0613a509b6
Add unit-test for #531 2025-07-22 00:58:36 +02:00
Markus Ebner
526ce78cf0
Add ui tests for named arguments in rust call expressions 2025-07-22 00:58:33 +02:00
René Kijewski
ba7b0a7967 Move DefaultFilterable into its own file 2025-07-21 22:31:05 +02:00
René Kijewski
b2b0d4cbba Add filters |default, |assigned_or and |defined_or
Also, `enum Pluralize<S, P>` is renamed into `enum Either<L, R>` and
exported.
2025-07-21 22:31:05 +02:00
Markus Ebner
1b1d604dbc Add unit-tests for #517 2025-07-21 16:55:31 +02:00
Guillaume Gomez
cf558be7e6 Add regression test for generics support in macro default value and call 2025-07-21 00:38:55 +02:00
Guillaume Gomez
fc2b0349ac Add ui test for generics on loop.cycle 2025-07-21 00:38:55 +02:00
Guillaume Gomez
6de8ff8042 Forbid string literal suffix 2025-07-21 00:35:48 +02:00
Guillaume Gomez
d8bf38978c Add fuzzing test 2025-07-20 16:27:23 +02:00
Guillaume Gomez
57554f3d42 Update tests 2025-07-20 16:27:23 +02:00
Guillaume Gomez
79d8f8886b Update to rust edition 2024 and to MSRV 1.88 2025-07-07 22:23:29 +02:00
Markus Ebner
2bd436417a
Add unit-tests for #505 2025-07-05 03:21:34 +02:00
Markus Ebner
19c685b51a
Add unit-test for #507 2025-07-05 03:21:33 +02:00
Markus Ebner
7a379df480 Add unit-tests for #508 2025-07-05 01:45:18 +02:00
René Kijewski
4f5272406f parser: replace manual i_before with .with_taken() 2025-06-24 15:02:41 +02:00
René Kijewski
edfa31f9cf parser: ensure valid paths in generics 2025-06-23 18:31:16 +02:00
René Kijewski
3f380721a2 parser: reject illegal raw identifiers in attribute access 2025-06-23 18:31:16 +02:00
René Kijewski
76b26cd5fa parser: str lit must not be followed by suffix#
Resolves <https://issues.oss-fuzz.com/issues/426509683>.
2025-06-21 19:43:28 +02:00
René Kijewski
2e510b0862 Remove normalize_identifier benchmark
The benchmark is overly specific.
2025-06-20 16:19:24 +02:00
Guillaume Gomez
1275b58ccb
Merge pull request #486 from Kijewski/pr-more-core
Filters `linebreaks`, `paragraphbreaks` and `linebreaksbr` only need `core`
2025-06-17 16:54:01 +02:00
René Kijewski
b6acf7b3a8 parser: simplify {# comment #} parsing
`winnow`'s `take_until` with feature `simd` enabled is implemented like
our "optimized" `skip_till`. There is no need to reinvent the wheel.
2025-06-16 23:49:58 +02:00
René Kijewski
568ced0c55 parser: recognize comments in macro calls
Fixes issue <https://issues.oss-fuzz.com/issues/425145246>
2025-06-16 23:49:47 +02:00
Guillaume Gomez
e329f98433
Merge pull request #484 from Kijewski/pr-u+10ffff
parser: U+10FFFF is the highest Unicode codepoint
2025-06-16 16:50:36 +02:00
René Kijewski
b9490c4b5d Filter paragraphbreaks only needs core 2025-06-14 14:57:55 +02:00
René Kijewski
00b640c93b parser: better error message for bare CRs 2025-06-13 22:19:17 +02:00
René Kijewski
9ffa6b954c parser: U+10FFFF is the highest Unicode codepoint
Fix a small typo: parsing '\u{123456}` should parse up to 6 characters,
inclusively.
2025-06-13 11:32:51 +02:00