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

Code formatting breaks indentation #60

Closed
biddster opened this issue Sep 7, 2017 · 4 comments
Closed

Code formatting breaks indentation #60

biddster opened this issue Sep 7, 2017 · 4 comments

Comments

@biddster
Copy link

biddster commented Sep 7, 2017

I'm having trouble with the code formatter. It's quite likely that it's another formatter I have installed within VSCode but I'm not sure how to debug.

I have 'format on save' enabled and upon save, all the indentation in my plantuml file is removed.

If I change the '.plantuml' and '.wdsd' file association to Text via settings.json then the formatting doesn't happen and the preview renders fine.

What's the best way for me to debug this?

@qjebbs
Copy link
Owner

qjebbs commented Sep 7, 2017

What kind of indent you had and lost?

@biddster
Copy link
Author

biddster commented Sep 8, 2017

If we take a loop as the example, it's removing the loop inner block indentation. So every line gets aligned with the left margin.

@qjebbs
Copy link
Owner

qjebbs commented Sep 8, 2017

Do you mean while loop? I tested and following codes formatted as expected.

@startuml
start
repeat
    :read data;
    :generate diagrams;
repeat while (more data?)
stop
@enduml

@startuml
start
while (data available?)
    :read data;
    :generate diagrams;
endwhile
stop
@enduml

@biddster
Copy link
Author

biddster commented Sep 8, 2017

Those examples work fine for me too.

If I do this:

@startuml example
loop each Item
    Item->Item: I should be indented
end
@enduml

...it gets reformatted to this when I save...

@startuml example
loop each Item
Item->Item: I should be indented
end
@enduml

@qjebbs qjebbs closed this as completed in c9c1fe7 Sep 10, 2017
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