Guillaume Gomez
56f9288eda
Merge pull request #586 from GuillaumeGomez/fix-block-duplication-warning
...
Fix block duplication warning
2025-09-02 15:59:24 +02:00
Guillaume Gomez
04e9241e4f
Remove unwanted print = "ast"
forgotten in tests
2025-09-02 15:30:53 +02:00
René Kijewski
32dc474f57
Fix mdbook path in readthedocs
...
On readthedocs, which uses `asdf` instead of `rustup`, the path for
`cargo install` installations is `$HOME/.asdf/installs/rust/1.88.0/bin/XYZ`
instead of `$HOME/.cargo.bin`.
It looks like the path this is already in scope, otherwise `book/update-theme.py`
would have failed in <https://app.readthedocs.org/projects/askama/builds/29407005/ >, too.
2025-09-02 15:14:27 +02:00
Guillaume Gomez
129c3549d4
Add custom ui regression test for duplicated blocks calls
2025-09-02 15:08:59 +02:00
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
3a83b3ac65
Do not use cargo-quickinstall
for now
...
It seems like cargo-quickinstall had a breach of some sort:
[cargo-quickinstall#441]. As a precautionary measure they wiped many
pre-compiled files. Amongst them mdbook v0.4.52, which we use to build
our book, and cargo-fuzz v0.13.1, which we use for fuzzing.
This PR makes us not use pre-compiled programs, but use `cargo install`
instead.
[cargo-quickinstall#441]: <https://redirect.github.com/cargo-bins/cargo-quickinstall/issues/441 >
2025-09-02 14:59:49 +02:00
Guillaume Gomez
5c4b52ad62
Merge pull request #584 from GuillaumeGomez/extends-first
...
Emit an error if an extends block doesn't come first in a template
2025-08-25 12:28:31 +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
Guillaume Gomez
f869bea25e
Emit warnings if duplicated block
calls are done
2025-08-21 23:58:55 +02:00
Guillaume Gomez
3ab9ff6216
Merge pull request #582 from Kijewski/4654117948817408
...
parser: reject unclosed prefixed string
2025-08-21 23:31:41 +02:00
René Kijewski
cfa21a6513
parser: reject unclosed prefixed string
...
In macro invocations, the input `i"` was interpreted as the identifier
`i`, and the `"` was consumed without being interpreted. This change
makes the code not ignore the quotation mark.
Resolves <https://issues.oss-fuzz.com/issues/440177293 >.
2025-08-21 22:38:56 +02:00
Guillaume Gomez
a9f56e3aa5
Merge pull request #579 from Kijewski/6380739026550784
...
parser: `r#_` is not a valid identifier
2025-08-19 23:09:10 +02:00
René Kijewski
8d5f3a5290
parser: r#_
is not a valid identifier
...
Resolves <https://issues.oss-fuzz.com/issues/439492383 >.
2025-08-19 22:23:11 +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
29d62fef30
Correct subspan for source = ..
templates
2025-08-19 17:41:20 +02:00
René Kijewski
81252cd0a2
parser: make State
part of InputStream
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
René Kijewski
27e7ff4fd5
parser(non-working commit!): remove lifetimes from [With]Span
2025-08-19 17:41:20 +02:00
Guillaume Gomez
c335f99106
Merge pull request #576 from GuillaumeGomez/add-missing-for-docs
...
Add missing documentation about for loop features
2025-08-18 16:12:15 +02:00
Guillaume Gomez
acce36cede
Add missing documentation about for loop features
2025-08-18 14:38:28 +02:00
Guillaume Gomez
112a9b1552
Fix some code examples annotations
2025-08-18 12:58:24 +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
1da2840071
Fix book code examples
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
Guillaume Gomez
06d6ec37f6
Merge pull request #573 from Kijewski/pr-linkfix
...
readme: fix a link, include readmes in `lib.rs`
2025-08-16 21:03:27 +02:00
René Kijewski
016fe82199
readme: fix a link, include readmes in lib.rs
2025-08-15 13:06:10 +02:00
Markus Ebner
59a982028e
Fix #563 : filesizeformat with proper accuracy
2025-08-13 12:26:25 +02:00
Guillaume Gomez
e40da12343
Merge pull request #569 from GuillaumeGomez/old-paths
...
Fix invalid handling of paths starting with `::`
2025-08-13 11:39:04 +02:00
Guillaume Gomez
e8572f4580
Fix invalid handling of paths starting with ::
2025-08-13 11:20:49 +02:00
dependabot[bot]
680121125a
build(deps): bump actions/checkout from 4 to 5
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 14:55:17 +02:00
Guillaume Gomez
885e0f7de1
Fix wrong span context for askama variables
2025-08-12 14:54:51 +02:00
Guillaume Gomez
756717c2f7
Merge pull request #560 from Kijewski/pr-inputstream
...
parser: use `LocatingSlice<&str>` instead of `&str`
2025-08-08 11:59:40 +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
Guillaume Gomez
e9021aa1a5
Merge pull request #557 from Kijewski/pr-rustc_hash
...
parser/derive: use only one hasher throughout the proc_macro
2025-08-06 21:05:53 +02:00
René Kijewski
267a115672
parser/derive: use only one hasher throughout the proc_macro
2025-08-06 20:41:20 +02:00
René Kijewski
3a677870d9
derive: remove unneeded .to_string()
call
...
The invocation is not only bad for performance, but also not necessarily
correct:
* The output of `TokenStream::to_string()` is free to add spaces between
`self` and `.`, or before `self`.
* The `.` might belong to `..` or `..=`.
2025-08-06 19:11:26 +02:00
René Kijewski
58bb4d921f
derive: remove trait BufferFmt
2025-08-06 19:11:26 +02:00
René Kijewski
f62cdfb49a
derive: better spans for Target
2025-08-06 19:11:26 +02:00
René Kijewski
e1eeb815ea
derive: minor macro clean-ups
...
* prefix temporaries in `{{ expr }}` with `__askama`
* replace custom `spanned!(..)` with `quote_spanned!(..)`
* replace `buf.write_tokens(quote_spanned!(..))` with `quote_into!(..)`
2025-08-06 19:11:26 +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
7dbbe397f9
Fix clippy lints
2025-08-06 19:11:26 +02:00
Guillaume Gomez
da850d736f
Implement print = "code"
on enums
2025-08-06 19:11:26 +02:00