mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Add dumbindent algorithm comment
This commit is contained in:
1 parent
e42d126667
commit
22d08366c8
3 files changed
+112
-32
No files matched your search
@@ -95,26 +95,24 @@ func TestTabs(tt *testing.T) {
|
||||
|
||||
func ExampleFormatBytes() {
|
||||
const src = `
|
||||
// Blah blah blah.
|
||||
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
j = 0; j < 4; j++;
|
||||
j = 0; j++; // Semi-colons not within parentheses.
|
||||
if (i < j) { foo(); }
|
||||
u = (v +
|
||||
w);
|
||||
}
|
||||
`
|
||||
|
||||
os.Stdout.Write(FormatBytes(nil, []byte(src), nil))
|
||||
|
||||
// Output:
|
||||
// // Blah blah blah.
|
||||
//
|
||||
// for (i = 0; i < 3; i++) {
|
||||
// j = 0;
|
||||
// j < 4;
|
||||
// j++;
|
||||
// j++; // Semi-colons not within parentheses.
|
||||
// if (i < j) {
|
||||
// foo();
|
||||
// }
|
||||
// u = (v +
|
||||
// w);
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user