rinja-rs / rinja

A template rendering engine based on Jinja, generating type-safe Rust code at compile time.
https://rinja.readthedocs.io
Apache License 2.0
28 stars 4 forks source link

Specific errors when `macro`, `import` or `extends` used outside top level #41

Closed softdevca closed 5 days ago

softdevca commented 6 days ago

More specific errors when macro, import or extends are used outside top level. This was helpful when finding a stray {% import %}.

GuillaumeGomez commented 6 days ago

Looks good, thanks! Please add UI tests (in testing/tests/ui).

GuillaumeGomez commented 6 days ago

I opened https://github.com/rinja-rs/rinja/pull/42, so once merged, all you'll have to do is update UI test added (and also improve the code added by the PR).

softdevca commented 5 days ago

See #42.