cue/format: indent single line instead of 2 after embedding
Change-Id: I3cdfab462ebb0df4dabf72f7491e3d9d6c43b274
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3620
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue b/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
index 9b3f184..7f1869f 100644
--- a/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
+++ b/cmd/cue/cmd/testdata/pkg/cuelang.org/go/cmd/cue/cmd/testdata/code/go/pkg1/file1_go_gen.cue
@@ -15,7 +15,6 @@
String: string
Inline
-
NoInline: NoInline
CustomJSON: CustomJSON
CustomYAML: null | CustomYAML @go(,*CustomYAML)
diff --git a/cue/export_test.go b/cue/export_test.go
index 80241aa..f486c69 100644
--- a/cue/export_test.go
+++ b/cue/export_test.go
@@ -359,12 +359,10 @@
}
def :: {
emb
-
b: 2
}
e :: {
f
-
<_>: <100
b: int
}
@@ -444,7 +442,6 @@
} | {
b: 1
}
-
}
}`),
}, {
diff --git a/cue/format/node.go b/cue/format/node.go
index a8d3f51..44c6fe9 100644
--- a/cue/format/node.go
+++ b/cue/format/node.go
@@ -266,7 +266,7 @@
f.print(formfeed)
}
f.expr(n.Expr)
- f.print(newsection, noblank)
+ f.print(newline, noblank)
case *ast.Ellipsis:
f.ellipsis(n)