-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
It would be cool if this template might produce something like:
@()
begin
@for n in &vec![0, 1, 2] {
@if true {
test
}
}
end
begin
test
test
test
end
But to get the same output I have to write the template in this way, and it looks kinda dirty:
@()
begin@for n in &vec![0, 1, 2] {@if true {
test}}
end
So the point is: if a line contains only start or end of an expression, and while spaces or tabs or line-break, then it will be skipped. It will allow to write more readable and intuitive templates.
More examples:
- See the template written with Rocker Java library: https://gist.github.com/Aunmag/1a2424f853e7d47b10c726a78a480119
- See the same template written with ructe https://gist.github.com/Aunmag/6737e50815ed10832e8790d6ee6e3aa4
The first one looks better, doesn't it? :)
I hope you will take more attention to Rocker developer's experience, 'cause we need such a great tool in Rust too.
Metadata
Metadata
Assignees
Labels
No labels