plantUML does not render when embedded in codeblock
anoff opened this issue · 5 comments
Amazing to see plantUML support coming in with #60
However one issue I am having is that code renders plantuml if it is in the following layout
```plantuml
@startuml
@enduml
```
The markdown2pdf does render this as codeblocks in the pdf though. Vice-versa w/o the code block the vscode markdown renderer won't work. It is also how Gitlab renders plantUML in markdown.
I could look into possible options for the plugin to support this behavior.
Is this a behavior you want to support?
The code block is also required to make the preview via PlantUML work.
I added
"markdown-pdf.plantumlOpenMarker": "```plantuml",
"markdown-pdf.plantumlCloseMarker": "```",
to the settings.json, now it works both in the preview and also in the rendered pdf
This should work OTB given that almost all other plugins use code blocks (not only vscode, for example Gitlab expectes this).
When using this method I run into the following error as the final three backticks from the code block are taken into account for conversion apparently. Needless to say the conversion works in the preview so it doesn't look like a simple sysntax error
[From string (line 21) ]
@startuml
start
:Open App;
partition Authenticate {
while (valid sid ?) is (false)
:login;
:save sid;
endwhile
->true;
}
partition Browse {
:Show browser at root folder;
while (navigate)
:show files and folders;
endwhile
}
:close app;
stop
```
^^^^^
Syntax Error?
With the following in settings.json :
{
"markdown-pdf.plantumlCloseMarker": "```plantuml",
"markdown-pdf.plantumlOpenMarker": "```"
}
I added
"markdown-pdf.plantumlOpenMarker": "```plantuml", "markdown-pdf.plantumlCloseMarker": "```",to the settings.json, now it works both in the preview and also in the rendered pdf
I've used that solution and it works for me now :)