Skip to content

When encoding record elements, check if indentation is required#33

Merged
MaybeJustJames merged 2 commits into
masterfrom
fix-indentation-empty-nested-record-list
Jan 5, 2023
Merged

When encoding record elements, check if indentation is required#33
MaybeJustJames merged 2 commits into
masterfrom
fix-indentation-empty-nested-record-list

Conversation

@MaybeJustJames

@MaybeJustJames MaybeJustJames commented Jan 5, 2023

Copy link
Copy Markdown
Owner

Nested record element values that do not immediately begin with a newline character must have a space between the colon (after the key) and the encoded value.

E.g. YAML interprets this as a string:

test:[]

But this as a record containing a single key ("test") with a value being an empty list:

test: []

Closes #32

Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000 by @MyGithubTag)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

James Collier added 2 commits January 5, 2023 10:49
Nested record element values that do not immediately begin with a
newline character must have a space between the colon (after the key)
and the encoded value.

E.g. YAML interprets this as a string:

```
test:[]
```

But this as a record containing a single key ("test") with a value
being an empty list:

```
test: []
```
@MaybeJustJames MaybeJustJames merged commit d82859f into master Jan 5, 2023
@MaybeJustJames MaybeJustJames deleted the fix-indentation-empty-nested-record-list branch January 5, 2023 09:53
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.

Incorrect encoding of empty sub-record

1 participant