How to keep indentation in !include_many during preprocessing

0 votes
asked Feb 10, 2021 in Question / help by anonymous

Lets assume that we have a file A.puml with content:
 

@startuml
B -> A: test
@enduml

and this file is included in two diagrams.

Diagram first.puml:

@startuml
A-> B
!include A.puml
B -> C
@enduml

Diagram second.puml:

@startuml
alt if something
    A-> B
    !include A.puml
    B -> C    
else if something else
...
@enduml

When I run `java -preproc` on both files I expect to get two files with such indention:

first.preproc:

@startuml
A-> B
B -> A: test
B -> C
@enduml

second.preproc:

@startuml
alt if something
    A-> B
    B -> A: test
    B -> C    
else if something else
...
@enduml

but I get something like this:

first.preproc:

@startuml
A-> B
B -> A: test
B -> C
@enduml

second.preproc:

@startuml
alt if something
    A-> B
B -> A: test
    B -> C    
else if something else
...
@enduml


Is it possible to keep indention of the place when I use !include word? Right now preprocessor just replace whole line and I have a problem when !include is used in several places with different indention. 

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...