AdRoll / rebar3_format

Erlang Formatter for Rebar3
https://tech.nextroll.com/blog/dev/2020/02/25/erlang-rebar3-format.html
MIT License
108 stars 21 forks source link

`-else.` gets formatted to `- else .` in otp25 #337

Open tak30 opened 1 year ago

tak30 commented 1 year ago

Describe the bug -else. gets formatted to - else .

In otp25. In otp24 it gets formatted to -else. To Reproduce

Fomat the following code with otp25:

-if(?OTP_RELEASE >= 25).

foo() ->
  ok.

-else.

foo() ->
  ok.

-endif.

Expected behavior It gets formatted to -else.

Rebar3 Log Run rebar3 with DEBUG=1 and paste its output here.

Additional context It is probably related to else being a keyword in otp25 due to the maybe_expr