erlang / otp

Erlang/OTP
http://erlang.org
Apache License 2.0
11.42k stars 2.96k forks source link

ERL-215: erlang-mode: wrong indentation with binary string #3606

Open OTP-Maintainer opened 8 years ago

OTP-Maintainer commented 8 years ago

Original reporter: tuncer Affected version: OTP-19.0.2 Component: tools Migrated from: https://bugs.erlang.org/browse/ERL-215


If you have code like this

{code}

some_fun() ->
    ok.

usage() ->
    S = <<"
multi-line
usage
string
">>,
    io:put_chars(S)..

another_fun() ->
    true.
{code}

then indenting the usage() function, and especially a region that includes this function, will mess up the carefully left-aligned (starting at column zero) help string.

First encountered in [rebar.erl|https://github.com/rebar/rebar/blob/6eb9e806860129de0184e3d82444043e5055e2b2/src/rebar.erl#L410-L488].
u3s commented 1 year ago

related to #3521