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

Extra line after a type and before a comment prevents edoc from parsing it correctly #356

Open
elbrujohalcon opened this issue Dec 20, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@elbrujohalcon
Copy link
Collaborator

Describe the bug
The default formatter adds an empty line after an attribute if it finds a comment below it. That's an issue because EDoc uses comments after -types to document those types and it does not work if there is an empty line between one thing and the other.
For a more detailed explanation, check @erszcz's amazing comment here: inaka/worker_pool#200 (comment)

To Reproduce
Try to format a module containing this:

-opaque another_list(X) :: [X].
%% another_list() is a kind of list...

The formatter turns it into…

-opaque another_list(X) :: [X].

%% another_list() is a kind of list...

Expected behavior
The text should remain as is.

@elbrujohalcon elbrujohalcon added the bug Something isn't working label Dec 20, 2023
@elbrujohalcon elbrujohalcon added this to the 1.2.1 milestone Dec 20, 2023
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

No branches or pull requests

1 participant