-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make indentation more intuitive #71
Comments
Probably this issue intersects with #29 |
After some experimentation, I have more or less decided against the solution I suggsted in #29, and in favor of something like #42 (comment) . That would hopefully make it possilble to get your expected output by adding a backslash at the end of selected lines of the template. Do you think that would suffice? |
I'm not sure how it would look like. Like this?
Personally, this approach is not clean enough for me. Maybe I miss something. |
Yes, something like that. Your idea of not generating output for template lines that is only statements would be nice, but a bit harder to implement. Ructe does not look at a template line by line, but would instead have to look at the end of the last thing before a block-opening statement and compare it to the first thing in the block, and similiar for the end of the block (and a special case for "else" blocks). But I'll keep this issue open and think about it. PR:s welcome, of course. |
It would be cool if this template might produce something like:
But to get the same output I have to write the template in this way, and it looks kinda dirty:
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:
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.
The text was updated successfully, but these errors were encountered: