Skip to content
New issue

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

Formatter replaces code in ifdef sections #220

Closed
matlaj opened this issue Nov 12, 2021 · 1 comment
Closed

Formatter replaces code in ifdef sections #220

matlaj opened this issue Nov 12, 2021 · 1 comment

Comments

@matlaj
Copy link

matlaj commented Nov 12, 2021

Using the VS Code 'Format Document' function on this code...:

-module(mymodule).
-export([myfun/0]).

-ifdef(SOMETHING).
myfun() -> io:format("Hello there!").
-else.
myfun() -> io:format("General Kenobi...!").
-endif.

...results in the following:

-module(mymodule).

-export([myfun/0]).

-ifdef(SOMETHING).

myfun() -> io:format("General Kenobi...!").

-else.

myfun() -> io:format("General Kenobi...!").

-endif.

Notice how the contents of the -ifdef section got replaced by the contents of the -else section.

@wojteksurowka
Copy link
Contributor

Fixed by #224

@matlaj matlaj closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants