431 Commits

Author SHA1 Message Date
Guillaume Gomez
fc1d52d604 Add more tests for recursion errors 2024-06-20 18:53:14 +02:00
Guillaume Gomez
e2eb76b860 Fix block partial rendering 2024-06-17 18:33:34 +02:00
Guillaume Gomez
870565eb8e Update ui tests 2024-06-17 17:18:55 +02:00
Guillaume Gomez
2d80cc3524 Rename everything to rinja 2024-06-17 15:58:52 +02:00
Guillaume Gomez
34f84dc10f
Add support for elif (#1057)
Co-authored-by: René Kijewski <rene.kijewski@fu-berlin.de>
2024-05-23 14:27:42 +02:00
René Kijewski
38a2a86e55 Better error messages for truncated files 2024-05-17 18:29:47 +02:00
René Kijewski
a03a06c338 Add unclosed node ui tests 2024-05-17 18:29:47 +02:00
René Kijewski
2b4f264d5a Better error message for break/continue 2024-05-16 13:50:49 +02:00
René Kijewski
e605478076 Better error message for {% macro super %} 2024-05-16 13:50:49 +02:00
René Kijewski
33f823d582 Add {% macro super %} test 2024-05-16 13:50:49 +02:00
Guillaume Gomez
4d237ab274 Fix new rustc lints 2024-05-16 13:47:02 +02:00
Guillaume Gomez
dd6b6be435 Fix wrong handling of nested templates with block 2024-05-16 13:47:02 +02:00
Guillaume Gomez
cefa443839 Remove "unused type" warnings in tests 2024-05-02 20:34:12 +02:00
Guillaume Gomez
ed512051cf Add deref builtin filter 2024-05-02 20:34:12 +02:00
René Kijewski
5955ba23c1 Remove obsolete trybuild outputs
The current main branch does not compile with rust 1.58 or earlier
anyway.
2024-04-29 08:33:32 +02:00
Guillaume Gomez
c6d0ba8dbc Add checks for chars 2024-04-26 16:50:12 +02:00
Guillaume Gomez
bd0bfaa95c Add test for block imports access 2024-04-25 11:09:02 +02:00
wrapperup
1347d36363 Add support for rendering a single block 2024-04-25 10:44:58 +02:00
Guillaume Gomez
3e5ccaeea5 Add more tests for floating parsing 2024-04-24 14:46:43 +02:00
René Kijewski
c48532fb17 Implement Render even if parsing failed
This makes error messages much more readable.
2024-04-18 12:54:15 +02:00
René Kijewski
c9a2254e58 Fix expected error message in UI test 2024-04-17 13:40:41 +02:00
Guillaume Gomez
ad73f755e9 Correctly handle whitespace character(s) on filter blocks 2024-04-12 17:23:42 +02:00
Andreas
8e067322fe Fix typo in regression test causing the wrong thing to be tested 2024-04-11 21:16:32 +02:00
Guillaume Gomez
7f6beca8a8 Add UI regression tests for cyclic dependencies 2024-04-11 20:39:29 +02:00
Guillaume Gomez
66b53eecaf Remove markdown filter and comrak dependency 2024-04-06 23:07:30 +02:00
Guillaume Gomez
45ae8daba4 Move cfg(not(windows)) at the top of tests/ui.rs 2024-04-05 12:13:54 +02:00
Guillaume Gomez
0b4b7d6345 Improve error message by providing the file where the error occurred if it is not an inlined source 2024-04-05 12:13:54 +02:00
Guillaume Gomez
353304ca34 Fix tests warnings 2024-03-12 16:28:20 +01:00
Guillaume Gomez
ad97dc1d2a Add test for filter block chaining 2024-03-11 14:25:46 +01:00
René Kijewski
5149cd9307 Implement Template for &Template
`Template` does not have methods that alter `self` is any way, so a
reference to a `Template` can implement `Template`, too.
2024-03-07 16:35:56 +01:00
Guillaume Gomez
1810047b1e Add test for filter block 2024-03-07 11:33:34 +01:00
Guillaume Gomez
585a992246 Add ui test for extends error 2024-01-22 17:13:01 +01:00
Dirkjan Ochtman
79738ff238 Fix support for mixed case variables 2024-01-18 11:23:18 +01:00
max
5cad82f38e Allow included templates to extend, import, and macro
Signed-off-by: max <gmx.sht@gmail.com>
2024-01-17 17:58:53 +01:00
Guillaume Gomez
12e178ce40 Add test for as_ref builtin filter 2024-01-12 10:38:15 +01:00
Guillaume Gomez
1ee067f2b6 Revert "Add automatic borrowing to let statement"
This reverts commit 3d52283b74573af509deb3c47cbabf7b7b58b1dd.
2024-01-10 10:42:31 +01:00
Jakub Stachurski
50c64bc865 Make the markdown filter compatible with String
This commit solves issue #719.

This is done by making the markdown filter borrow the string and
simplifying the filter to accept `&str` instead of `AsRef<str>`

Add test for the markdown filter using  as input

Revert markdown filter changes

Revert unnecessary changes

Improve test_markdown_owned_string test

Use cargo fmt
2024-01-09 21:23:47 +01:00
max
3d52283b74 Add automatic borrowing to let statement
Signed-off-by: max <gmx.sht@gmail.com>
2023-12-13 16:47:02 +01:00
max
28182a1549 Bugfix in is_attr_self()
Signed-off-by: max <gmx.sht@gmail.com>
2023-12-13 16:47:02 +01:00
Guillaume Gomez
e4b8ca3c44 Allow trailing comma in macro definition and call 2023-12-07 11:03:26 +01:00
Guillaume Gomez
b5797cba88 Add macro test with only argument being passed as named 2023-12-07 09:10:32 +01:00
Dirkjan Ochtman
69e2db6efa Upgrade to comrak 0.19 2023-11-30 13:33:06 +01:00
Guillaume Gomez
28e26751ce Add tests for named arguments in macro calls 2023-11-28 11:36:09 +01:00
PizzasBear
696561003d
Add better support for rust-like number literals (#908)
Signed-off-by: max <gmx.sht@gmail.com>
2023-11-22 16:09:33 +01:00
PizzasBear
48c6cd327d
Enhance match to include multiple targets (#911)
Signed-off-by: max <gmx.sht@gmail.com>
2023-11-22 14:56:14 +01:00
Guillaume Gomez
ea7267dfc2 Add UI tests for macros error message 2023-11-20 10:34:26 +01:00
Guillaume Gomez
77d5d28b20 Add UI test for elif error message 2023-10-25 14:54:14 +02:00
Guillaume Gomez
c056d6287b Improve error for invalid name used in endmacro 2023-10-25 14:30:35 +02:00
Guillaume Gomez
c3281e353d Improve error for invalid name used in endblock 2023-10-25 14:30:35 +02:00
Guillaume Gomez
a7f5186bf4 Add test specifically for named blocks, and named macros 2023-10-23 15:13:27 +02:00