Skip to content

Fix indent in nested list/dict#34

Merged
dpranke merged 1 commit intodpranke:masterfrom
roosephu:master
Mar 2, 2020
Merged

Fix indent in nested list/dict#34
dpranke merged 1 commit intodpranke:masterfrom
roosephu:master

Conversation

@roosephu
Copy link
Contributor

@roosephu roosephu commented Mar 1, 2020

This PR fixes wrong indentation of nested list/dict.

Related code:

print(json5.dumps([[1, 2, 3]], indent=2))

Expected result:

[
  [
    1,
    2,
    3,
  ],
]

Got:

[
  [
    1,
    2,
    3,
],
]

Copy link
Owner

@dpranke dpranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the fix!

@dpranke dpranke merged commit 8a7c9b9 into dpranke:master Mar 2, 2020
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.

2 participants