vscode-markdown-preview-enhanced icon indicating copy to clipboard operation
vscode-markdown-preview-enhanced copied to clipboard

[BUG] PlantUML preview seems broken

Open Hipska opened this issue 1 year ago • 2 comments

Describe the bug

When having a README file with an embedded PlantUML diagram, the diagram used to be rendered and displayed as an image in the preview. This seems not to be working anymore.

Environment

  • OS: macOS Sonoma 14.2.1
  • VSCode: 1.85.1
  • Markdown Preview Enhanced: 0.8.0

To Reproduce Steps to reproduce the behavior:

  1. Create markdown file with embedded PlantUML diagram
  2. Click on preview
  3. See raw PNG bytes

Expected behavior The rendered PNG should be displayed as image instead of raw bytes.

Markdown file See screenshot..

Screenshots image

Additional context N/A

Hipska avatar Jan 09 '24 10:01 Hipska

I bump into similar case, but is under different env.

  • OS: Windows 10
  • VS Code: 1.88.1
  • MPE: 0.8.13

A possible solution that works on Windows:

  1. [Optional?]Remove All customized settings of markdown-preview-enhanced in settings.json
  2. uninstall MPE
  3. turn off all VsCode instance.
  4. reinstall MPE
  5. restart VsCode.

Then everything seems to work again in my case.

Details of my case: After I changed some settings of Markdown-Preview-Enhanced(MPE), suddenly both @import puml file and embedded puml got similar error.

I am not for sure which config is the root cause. Tried several settings without luck, including: remove kroki.io setting or make it empty, apply a working plantuml pickweb locally, make plantuml-server empty but give the new plantuml.jar absolute path, ...

At last, I tried reinstallation, then both @import and embedded puml work again.

Root cause is still not being identified, though, my working settings for MPE ver. 0.8.13 are listed below as a clue for further investigation:

    "plantuml.jar": "C:/FreeApps/plantuml/plantuml.jar",
    "plantuml.render": "PlantUMLServer",
    "plantuml.server": "http://localhost:18080/svg/",
    "plantuml.exportFormat": "svg",
    "markdown-preview-enhanced.alwaysShowBacklinksInPreview": true,
    "markdown-preview-enhanced.plantumlJarPath": "C:/FreeApps/plantuml/plantuml.jar",
    "plantuml.urlFormat": "svg",
    "markdown-preview-enhanced.krokiServer": "",

EnochLiou avatar Apr 24 '24 06:04 EnochLiou

Lol very weird: I started your process and uninstalled the extension and then restarted vscode. And now the preview with puml works again 🤣. I don't know how or why, but this extension doesn't show up as installed anymore..

Hipska avatar Apr 24 '24 07:04 Hipska

it works ok

  "markdown-preview-enhanced.plantumlJarPath": "C:\\FreeApps\\plantuml\\plantuml-1.2024.6.jar",

weixiaolv avatar Aug 26 '24 17:08 weixiaolv