qjebbs/vscode-plantuml

Code formatting still breaks indentation

domiq44 opened this issue · 1 comments

Hello,

I use extension version 2.17.5 and I'm having trouble with the code formatter.

@startuml Hello World

hide footbox
title Oauth 2.0 Abstract protocol flow
autonumber
actor user as "resource owner (user)"
box "token stays secure" #FAFAFA
    participant client as "client (application)"
    participant authorization as "authorization server"
    database resource as "resource server"
end box

group user authorizes client
    client -> user : request authorization
    note left
        **grant types**:
        # authorization code
        # implicit
        # password
        # client_credentials
    end note
    user --> client : authorization grant
end group

group token is generated
    client -> authorization : request token\npresent authorization grant
    authorization --> client :var:  access token
    note left
        **response types**:
        # code
        # token
    end note
end group

group resource can be accessed
    client -> resource : request resource\npresent token
    resource --> client : resource
end group

@enduml

...it gets reformatted to this when "Format Document"...

@startuml Hello World

hide footbox
title Oauth 2.0 Abstract protocol flow
autonumber
actor user as "resource owner (user)"
box "token stays secure" #FAFAFA
participant client as "client (application)"
participant authorization as "authorization server"
database resource as "resource server"
end box

group user authorizes client
    client -> user : request authorization
    note left
        **grant types**:
        # authorization code
        # implicit
        # password
        # client_credentials
    end note
    user --> client : authorization grant
    end group

    group token is generated
        client -> authorization : request token\npresent authorization grant
        authorization --> client :var:  access token
        note left
            **response types**:
            # code
            # token
        end note
        end group

        group resource can be accessed
            client -> resource : request resource\npresent token
            resource --> client : resource
            end group

            @enduml

Yes, I get this too. Nested groups just increase the indentation, without decreasing it with "end group".