Closed fertapric closed 4 years ago
To give more context, this remains unchanged in all versions (including v1.10):
defmodule Sample do
@moduledoc false
# Comment 1
# Comment 2
@attr1 1
# Comment 3
# Comment 4
@doc "Doc"
# Comment 5
@attr2 2
# Comment 6
def sample, do: :sample
end
However, this code remains unchanged in prior version of v1.10:
defmodule Sample do
@moduledoc false
# Comment 1
@attr1 1
# Comment 3
@doc "Doc"
@attr2 2
# Comment 6
def sample, do: :sample
end
But in v1.10:
defmodule Sample do
@moduledoc false
# Comment 1
@attr1 1
# Comment 3
@doc "Doc"
@attr2 2
# Comment 6
def sample, do: :sample
end
Environment
Elixir 1.10.1 (compiled with Erlang/OTP 22)
However, running
mix format
in Elixir v1.10 changes the code above to:In addition, this code is unchanged in all versions (including v1.10):
Expected behavior
I would expect
mix format
to not add a new line between@moduledoc false
and the comment.