{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/reason/issues/1723","repository_url":"https://api.github.com/repos/facebook/reason","labels_url":"https://api.github.com/repos/facebook/reason/issues/1723/labels{/name}","comments_url":"https://api.github.com/repos/facebook/reason/issues/1723/comments","events_url":"https://api.github.com/repos/facebook/reason/issues/1723/events","html_url":"https://github.com/facebook/reason/issues/1723","id":284792325,"node_id":"MDU6SXNzdWUyODQ3OTIzMjU=","number":1723,"title":"Refmt \"squishes\" different functions together for nested modules","user":{"login":"Risto-Stevcev","id":6767374,"node_id":"MDQ6VXNlcjY3NjczNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6767374?v=4","gravatar_id":"","url":"https://api.github.com/users/Risto-Stevcev","html_url":"https://github.com/Risto-Stevcev","followers_url":"https://api.github.com/users/Risto-Stevcev/followers","following_url":"https://api.github.com/users/Risto-Stevcev/following{/other_user}","gists_url":"https://api.github.com/users/Risto-Stevcev/gists{/gist_id}","starred_url":"https://api.github.com/users/Risto-Stevcev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Risto-Stevcev/subscriptions","organizations_url":"https://api.github.com/users/Risto-Stevcev/orgs","repos_url":"https://api.github.com/users/Risto-Stevcev/repos","events_url":"https://api.github.com/users/Risto-Stevcev/events{/privacy}","received_events_url":"https://api.github.com/users/Risto-Stevcev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-27T20:39:44Z","updated_at":"2018-06-14T05:14:48Z","closed_at":"2018-06-14T05:14:48Z","author_association":"NONE","body":"For example, if I parse this using `refmt --print re --parse re Foo.re`:\r\n\r\n```reason\r\nlet foo = (x) => x ++ \"!\";\r\nlet bar = 123;\r\n\r\n\r\nlet norf = \"worble\";\r\n```\r\nit becomes:\r\n```reason\r\nlet foo = (x) => x ++ \"!\";\r\n\r\nlet bar = 123;\r\n\r\nlet norf = \"worble\";\r\n```\r\n\r\nIt will separate declarations with a newline so that it's easy to read. But for inner modules it will \"squish\" them together like this:\r\n```reason\r\nlet foo = (x) => x ++ \"!\";\r\n\r\nmodule Wizz = {\r\n  let bar = 123;\r\n\r\n\r\n  let norf = \"worble\";\r\n};\r\n```\r\nbecomes\r\n```reason\r\nlet foo = (x) => x ++ \"!\";\r\n\r\nmodule Wizz = {\r\n  let bar = 123;\r\n  let norf = \"worble\";\r\n};\r\n```\r\n\r\nFor this really simple example it's not a big deal, but for larger modules it makes the code substantially less readable. My suggestion is to have refmt continue to separate declarations with a newline\r\n\r\nThe nicest solution would be to have a flag, which when turned on refmt won't change how you separate declarations with newlines -- it keeps the structure you gave it. It would still re-format lines that are too long, but the flag would make refmt ignore how you separated declarations with newlines"}}
{"actor":{"display_login":"jaredly"}}