vscode-plantuml
vscode-plantuml copied to clipboard
!include not inlined in markdown preview
The plantUML server responds with
[From string (line2)]
@startuml
!include config_sequence.puml
cannot include config_sequence.puml
i.e. the include file is not inlined
- inlining works when specifing absolut path to puml file
- VScode workspace folder includes the folder to example.md
- no folder settings in plantuml extension
- example.md and config_sequence.puml are stored in the same folder
the behavior can be reproduced with a minimal md file, e.g.
example.md
```plantuml
@startuml
!include config_sequence.puml
@enduml
```
Is there anything in this setting that forbids include inlining?
This seems to be related to previous redesigns of include handling, i.e. #260. According to the readme, I would have expected it to work given the new search order:
- The folder of the rendered file
- The includepaths as configured in settings.json Can somebody confirm whether a relative link (relative to the .md file, that is) is supposed to work in markdown preview?
No, the rendering codes has no way to get the parent document where the diagram is in, so relative links won't work.
that is understood from a server point of view.
Are you saying that the preprocessing is not used for markdown preview at all?
I am not able to run it as Local. And not with !include with server on Linux
@qjebbs: I spent half an hour analyzing the code in the preprocessing and I don't understand why this could not work.
Here are some ideas:
- If the parent document is unknown, just try all combinations of {includePaths, diagramsRoot, workspaceRoot} + include_string - the first that is an existing file is used.
- Alternatively (or, if step 1 fails), search for the relative path of the
!includein the diagramsRoot, and return the first hit.
Solution 2 would also make it unnecessary to add includePaths 🙂