We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Formatting the following code
samples do :fuel_type | :co2 | :year | :percentage # 2020 :diesel | 105 | 2020 | 0.069 end
Will result in:
samples do :fuel_type | :co2 | :year | :percentage # 2020---- :diesel | 105 | 2020 | 0.069 end
WIth 4 whitespaces after # 2020. I represented them with -
# 2020
-
Here is a test that reproduces the bug:
test "handle comments" do code = """ samples do :fuel_type | :co2 | :year | :percentage # 2020 :diesel | 105 | 2020 | 0.069 :petrol | 110 | 2020 | 0.054 end """ assert Samples.FormatterPlugin.format(code, []) == """ samples do :fuel_type | :co2 | :year | :percentage # 2020 :diesel | 105 | 2020 | 0.069 :petrol | 110 | 2020 | 0.054 end """ end
This is due to the offset we add to the first column
exsamples/lib/formatter_plugin.ex
Lines 122 to 124 in 3722216
A solution could be to pattern match on # in the walk function.
#
walk
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Formatting the following code
Will result in:
WIth 4 whitespaces after
# 2020
. I represented them with-
Here is a test that reproduces the bug:
This is due to the offset we add to the first column
exsamples/lib/formatter_plugin.ex
Lines 122 to 124 in 3722216
A solution could be to pattern match on
#
in thewalk
function.The text was updated successfully, but these errors were encountered: