680dc8cd91
Changed the indentation behavior such that an extra level of indentation is added after a line containing a ( or { that is not closed on the same line instead of aligning to the unclosed ( or {. This is consistent with how `go fmt` formats source code. Added regression tests.
56 lines
309 B
Plaintext
56 lines
309 B
Plaintext
1
|
|
{%( )}
|
|
|
|
2
|
|
{%( )
|
|
}
|
|
|
|
3
|
|
{%( )bar()}
|
|
|
|
4
|
|
{%( )bar()
|
|
}
|
|
|
|
5
|
|
{
|
|
bar()%( )}
|
|
|
|
6
|
|
{
|
|
bar()%( )}
|
|
|
|
7
|
|
{(%( ))}
|
|
|
|
8
|
|
{(%( )
|
|
)}
|
|
|
|
9
|
|
{(%( )foo())}
|
|
|
|
10
|
|
{(%( )foo()
|
|
)}
|
|
|
|
11
|
|
{(
|
|
bar()%( ))}
|
|
|
|
12
|
|
{(
|
|
bar()%( ))}
|
|
|
|
13
|
|
a := []int{
|
|
someFunction(%( )
|
|
),
|
|
}
|
|
|
|
14
|
|
foobar(baz,%( )
|
|
|
|
15
|
|
foobar{ // some comment%( )
|