Comments are not always rendered at the right position
DReigada opened this issue · 4 comments
When using recode as a mix format plugin, running mix format
multiple times on a file like the following will always format the file differently:
defmodule RecodeTest do
defstruct [
:field_1,
#######################################################
### A comment
#######################################################
:field_2
]
end
It seems that the problem is related to having a "multiline" comment between list elements, or at least this is the only place where I was able to reproduce the problem.
I've create a simple project to reproduce the issue: https://github.com/DReigada/recode_format_problem.git
Notice that no recode tasks are enable in recode's config file, but the problem happens independently of the configuration.
I'll gladly open a PR with a fix if I can get some guidance on where to start looking into the issue.
Opened a PR to solve this issue in sourceror
: doorgan/sourceror#128