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

Add newline between exports, which are multiline because of comments #59

Closed
awalterschulze opened this issue Jul 10, 2020 · 1 comment · Fixed by #67
Closed

Add newline between exports, which are multiline because of comments #59

awalterschulze opened this issue Jul 10, 2020 · 1 comment · Fixed by #67
Labels
bug Something isn't working

Comments

@awalterschulze
Copy link
Contributor

-export([ drop/4 %% comment
        ]).

%% Another comment
-export([ a/1,
        b/1
]).

is currently formatted to

%% comment
-export([drop/4]).
%% Another comment
-export([a/1, b/1]).

But there seems to be newline missing between the two exports as they are technically both multiline.

@awalterschulze awalterschulze added the bug Something isn't working label Jul 10, 2020
@awalterschulze
Copy link
Contributor Author

The reason for automatically adding a newline, given a comment, is that then the following

% bla
-define(FOO, "foo").
-define(BAR, "bar").
-define(BAZ, [
    "a"
]).

would be formatted to

% bla
-define(FOO, "foo").

-define(BAR, "bar").
-define(BAZ, [
    "a"
]).

But we can consider preserving new lines as then this would allow users to group defines manually

-define(FOO1, "foo").
-define(FOO2, "foo").

-define(NOTFOO, "bar").
-define(NOTFOO2, "bar").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant