-
Notifications
You must be signed in to change notification settings - Fork 146
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
Avoid changing definition docs into module docs #771
Labels
Comments
That might lead to people reporting a “bug” where an extra module Foo exposing (..)
{-| Module documentation comment inserted by elm-format to avoid an `elm make` bug – see https://somewhere -}
{-| returns 5 -}
foo = 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example input:
Current output:
The reason this was done is because
elm make
will use the comment as a module documentation. But this is annoying to people who just want the comment to stay with the definition. I hear confusion about this every year or two.Proposal: A better solution would be to insert an empty module doc, so output would be:
The trigger for this should probably be whether or not the doc comment is on the line immediately above the definition. The comment should be read as the module docs if there is more space between them.
The text was updated successfully, but these errors were encountered: