Skip to content

Make indentation more intuitive #71

@Aunmag

Description

@Aunmag

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:

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions