Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force breaks for nested records #1593

Merged
merged 1 commit into from
Nov 4, 2017

Conversation

IwanKaramazow
Copy link
Contributor

@IwanKaramazow IwanKaramazow commented Nov 3, 2017

Fixes #1556 (partially)

/* before */
let person = {"name": {"first": "Bob", "last": "Zhmith"}, "age": 32};

/* after */
let person = {
  "name": {
    "first": "Bob",
    "last": "Zhmith"
  },
  "age": 32
};

Nested records/bs-obj sugar will always be printed with breaks.
Improves readability/extensibility of the code a lot.

Note that it only works with record or bs-obj sugar which contains another record/bs-obj/objects.
Force breaking for nested objects hasn't been implemented yet, because of some printing challenges.

@chenglou
Copy link
Member

chenglou commented Nov 4, 2017

Thanks!

@chenglou chenglou merged commit 2dd1621 into reasonml:master Nov 4, 2017
chenglou added a commit that referenced this pull request Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants