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

plantUML does not render when embedded in codeblock #92

Open
anoff opened this issue Jul 2, 2018 · 5 comments
Open

plantUML does not render when embedded in codeblock #92

anoff opened this issue Jul 2, 2018 · 5 comments

Comments

@anoff
Copy link

anoff commented Jul 2, 2018

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?

@not-a-user
Copy link

The code block is also required to make the preview via PlantUML work.

@ghost
Copy link

ghost commented Jan 2, 2020

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

@majkinetor
Copy link

This should work OTB given that almost all other plugins use code blocks (not only vscode, for example Gitlab expectes this).

@Xoeseko
Copy link

Xoeseko commented Feb 28, 2020

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": "```"
}

@arturocandela
Copy link

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 :)

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

5 participants