Skip to content

Fix indentation for shadow key values - #388

Open
utkarshalpha wants to merge 1 commit into
go-ini:mainfrom
utkarshalpha:fix/shadow-key-indentation
Open

Fix indentation for shadow key values#388
utkarshalpha wants to merge 1 commit into
go-ini:mainfrom
utkarshalpha:fix/shadow-key-indentation

Conversation

@utkarshalpha

Copy link
Copy Markdown

Describe the pull request

WriteToIndent emitted indentation once per key, before iterating over that key's shadow values. As a result, only the first serialized value was indented. Move indentation into the per-value writer so every shadow line receives the configured indent.

The regression test covers a key with multiple shadow values and verifies each line retains the requested indentation.

Link to the issue: #367

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

Validation

  • go test ./...
  • go vet ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant