5 Commits

Author SHA1 Message Date
Guillaume Gomez
3b52c907c3 Rename rinja into askama 2025-03-11 19:31:06 +01:00
René Kijewski
42d58106b3 derive: add in_doc attribute 2024-08-20 11:50:30 +02:00
René Kijewski
307daa3179 derive: feature gate "code-in-doc" 2024-08-20 11:50:30 +02:00
René Kijewski
6a612e510b derive: use pulldown-cmark to interpret comments 2024-08-20 11:50:30 +02:00
René Kijewski
96fae8b8db derive: allow supplying source in comment
Using `#[template(source = "…")]` is tiresome, because you have to
escape the input. That makes it difficult to read, too. Using
`#[template(path = "…")` can be tiresome, too, if the code is small
and/or if you just want to prototype something.

This PR adds a third option to supply the source of a template: You can
supply the source in the comments of a template. This works similar to
doctest. Any <code>```rinja```</code> block gets extracted, and the
combined blocks are the source code of the template.
2024-08-20 11:50:30 +02:00