2279 Commits

Author SHA1 Message Date
René Kijewski
2d2592e719 Update fuzzing corpus URL 2025-03-11 20:18:00 +01:00
Guillaume Gomez
d8c24b5ccd
Merge pull request #360 from askama-rs/pr-typ
ci: ignore typos in librustdoc sources
2025-03-11 19:59:38 +01:00
René Kijewski
f2ed85812e ci: ignore typos in librustdoc sources
We copied the sources verbatim, so it's no use to fix any typos.

Also, "typ" is not really a typo in here, because "type" would not have
been a valid identifier.
2025-03-11 19:44:10 +01:00
Guillaume Gomez
3c4a2eb9b0 Comment out Cluster-Fuzz for now 2025-03-11 19:31:06 +01:00
Guillaume Gomez
3b52c907c3 Rename rinja into askama 2025-03-11 19:31:06 +01:00
Guillaume Gomez
0b098f1dd0
Merge pull request #351 from Kijewski/pr-ascii_str
Replace `from_utf8_unsafe()` with `AsciiStr`
2025-02-24 10:22:24 +00:00
René Kijewski
6ae689cbc3 Re-use Html escaping code to implement JSON escaping 2025-02-20 22:22:24 +01:00
dependabot[bot]
c3fac0ca99 build(deps): update pulldown-cmark requirement from 0.12.0 to 0.13.0
Updates the requirements on [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) to permit the latest version.
- [Release notes](https://github.com/raphlinus/pulldown-cmark/releases)
- [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: pulldown-cmark
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-16 16:57:16 +01:00
René Kijewski
84edf1cc77 Replace from_utf8_unsafe() with AsciiStr
This moves many unsafe block into one file.
2025-02-11 00:37:40 +01:00
René Kijewski
52de203fb1 Don't format with overflow_delimited_expr
The default value for `overflow_delimited_expr = true` was reverted to
`false`: [rust-lang/rust#136312].

[rust-lang/rust#136312]: https://redirect.github.com/rust-lang/rust/pull/136312
2025-02-09 21:45:58 +01:00
Guillaume Gomez
c496c0b1c5
Merge pull request #346 from Kijewski/pr-more-values
Implement `Values` for all collection types
2025-02-09 21:07:10 +01:00
Guillaume Gomez
e9483747d1
Merge pull request #342 from Kijewski/pr-no-derive
Make `derive` optional
2025-02-09 21:05:55 +01:00
Guillaume Gomez
da18bc0657
Merge pull request #349 from Kijewski/pr-escaper-arg-names
Rename `Escaper` argument `fmt` into `dest`
2025-02-09 20:58:15 +01:00
René Kijewski
e216f1b1ea Rename Escaper argument fmt into dest
I was confused for a moment why an escaper would accept an
`fmt::Formatter` or `fmt::Arguments`.
2025-02-09 18:43:33 +01:00
René Kijewski
e4f014745b Implement Values for all collection types 2025-02-09 18:27:02 +01:00
René Kijewski
98cb4233e2 Make derive optional
This is the same as in e.g. `serde` with the feature of the same name.
If you manually depend on `rinja_derive`, then you can make better use
of your multi-core setup.
2025-02-09 17:47:17 +01:00
Guillaume Gomez
742821b1ce
Merge pull request #343 from Kijewski/pr-serde_derive
Allow parallel compilation of `serde` and `serde_derive`
2025-02-09 12:26:25 +01:00
Guillaume Gomez
bb6153b38e
Merge pull request #340 from Kijewski/pr-stuff
book: document `blocks`
2025-02-09 12:25:47 +01:00
Guillaume Gomez
a0c8c43194
Merge pull request #341 from Kijewski/pr-missing-block
derive: fail if requested template block is missing
2025-02-09 12:24:34 +01:00
René Kijewski
b4eb430d3a Allow parallel compilation of serde and serde_derive 2025-02-09 04:33:16 +01:00
René Kijewski
13eea3bd74 derive: fail if requested template block is missing
Previously it was only tested if the block exists if there were any
blocks. If there weren't any, then an empty result would be rendered.
2025-02-08 23:00:54 +01:00
René Kijewski
eb4806abcd book: document blocks 2025-02-08 20:15:38 +01:00
René Kijewski
b8ac54b83d derive: remove duplicated guard 2025-02-08 19:32:20 +01:00
René Kijewski
b2ccdd756f derive: cannot use quote! like quote_spanned! 2025-02-08 19:30:48 +01:00
Guillaume Gomez
a0e19aa37e Improve code readability 2025-02-08 19:28:33 +01:00
Guillaume Gomez
77e846fc67
Merge pull request #337 from Kijewski/pr-blocks
derive: implement template attribute `blocks`
2025-02-08 11:06:21 +01:00
René Kijewski
137aaa0604 derive: implement template attribute blocks 2025-02-08 02:07:01 +01:00
René Kijewski
24c37c49f0 derive: replace some more format! with format_args! 2025-02-07 23:47:20 +01:00
René Kijewski
f0ded0ba32 derive: add span to missing block message 2025-02-07 23:29:04 +01:00
René Kijewski
f759c364f9 derive: no rinja on enum variants 2025-02-07 23:20:12 +01:00
René Kijewski
c13059096e Fix error messages 2025-02-04 22:45:40 +01:00
Guillaume Gomez
f361293da7 Improve macro call arguments mismatch errors 2025-02-04 22:45:40 +01:00
René Kijewski
44965f54f5 derive: add option to specify rinja path 2025-02-04 14:34:46 +01:00
René Kijewski
30e664182d derive: for enums, let Self refer to the original type 2025-02-04 01:24:59 +01:00
Guillaume Gomez
535df5ee76
Merge pull request #332 from Kijewski/pr-393401467
parser: add missing level guard in `if let`
2025-02-01 08:24:30 +01:00
René Kijewski
e1d61276e9 parser: add missing level guard in if let
Resolves <https://issues.oss-fuzz.com/issues/393401467>
2025-02-01 05:35:29 +01:00
René Kijewski
9b0ed3c952
Merge pull request #331 from Kijewski/pr-slice
Fix rust 1.86 clippy warnings
2025-01-31 21:49:01 +01:00
René Kijewski
9b8ace77b4 Fix rust 1.86 clippy warnings
* [`manual_div_ceil`]
* [`sliced_string_as_bytes`]
* Add `cargo.toml` for global clippy settings, e.g. msrv

[`manual_div_ceil`]: <https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil>
[`sliced_string_as_bytes`]: <https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes>
2025-01-31 21:22:33 +01:00
Ed Page
08bc972b2d
chore: Upgrade to Winnow 0.7 (#330)
* chore: Upgrade to Winnow 0.6.26

* refactor: Resolve deprecations

* refactor: Switch from Parser to ModalParser

* chore: Upgrade to Winnow 0.7

I am not thrilled with the fact that annotations of some kind (I used
no-op `map_err`s here) are needed for the errors and will be digging
into this to better understand why.  The code in `toml_edit` is very
similar and yet it doesn't need them.

* refactor: Remove From impl for ErrMode

* refactor: Remove map_err's added to work around 'impl From for ErrMode'
2025-01-31 21:20:20 +01:00
Guillaume Gomez
c0cb411232
Merge pull request #327 from Kijewski/pr-minor-stuff
Minor clean-ups
2025-01-29 13:03:56 +01:00
René Kijewski
a101903871 Minor clean-ups
* add missing softlinks
* sorted `Cargo.toml`s in root and testing
* suppress warnings in expanded code
2025-01-29 12:30:52 +01:00
Guillaume Gomez
e81ca4263e
Merge pull request #255 from Kijewski/pr-enum
Implement `enum` variants
2025-01-26 20:22:57 +01:00
René Kijewski
1066c884f3 book: add enum documentation 2025-01-26 02:23:51 +01:00
René Kijewski
5944ab9bef Implement enum variants 2025-01-26 02:23:51 +01:00
Guillaume Gomez
e418834149
Merge pull request #322 from Kijewski/pr-c37ee6c72e8c9ba008e5090bb3eedfad1a2ae802
Remove intermediate allocations for error messages
2025-01-25 23:29:48 +01:00
Guillaume Gomez
836046a8c5
Merge pull request #321 from Kijewski/pr-ext-askama
derive: add ".askama" to list of HTML extensions
2025-01-25 23:29:14 +01:00
René Kijewski
d0dcc1c0ce Remove intermediate allocations for error messages 2025-01-25 20:10:15 +01:00
René Kijewski
94288391b3 derive: add ".askama" to list of HTML extensions 2025-01-25 20:00:30 +01:00
Guillaume Gomez
cae09c50f4
Merge pull request #311 from GuillaumeGomez/runtime-values
Add support for "runtime" values
2025-01-24 00:08:43 +01:00
Guillaume Gomez
5257838127 Add new chapter for runtime values 2025-01-23 23:43:43 +01:00