Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -295,7 +295,7 @@ const (
|
||||
|
||||
// entry is one binding in a tomlDoc. entries live in a single slice in the
|
||||
// order they were added; emission walks that order directly, either as it is
|
||||
// (Encoder with GroupByKind(false)) or in kind-grouped passes over the same
|
||||
// (Encoder with LayoutKindDeclaration) or in kind-grouped passes over the same
|
||||
// slice (the default).
|
||||
type entry struct {
|
||||
kind entryKind
|
||||
@@ -1157,7 +1157,7 @@ func (e *encoder) writeBlankLine() {
|
||||
}
|
||||
|
||||
func (e *encoder) emitDoc(doc *tomlDoc, prefix []string) error {
|
||||
if e.opts.groupByKind {
|
||||
if e.opts.layout == LayoutKindGrouped {
|
||||
// Scalars first, then inline sub-tables as value lines, then the
|
||||
// remaining tables as headers, then arrays of tables. Each pass walks
|
||||
// the entries in place; grouping copies of them cost the encoder a
|
||||
|
||||
Reference in New Issue
Block a user