jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
626 stars 67 forks source link

why should plantuml be quoted in ```plantuml! instead of ```plantuml ? #70

Open zhangfuwen opened 2 years ago

zhangfuwen commented 2 years ago

the trailing ! is in compliant with markdown previewers in visual studio code.

jeffreytse commented 2 years ago

Hi @zhangfuwen

This design is to distinguish between code blocks and render blocks, especially when you want to show the code and the render result at the same time.

Thanks and Regards

qurm commented 2 years ago

I see the same issue with mermaid! and plantuml! and the usage without the ! is a standard in VS Code previewers, and in Github readme.md. This is really a major drawback for anyone working with Markdown in those tools.

There are plenty of alternatives to showing a code block for mermaid and plantuml, that are really only plain text.

The workaround for me is to add the section below to my _config.yml with code: 'mermaid'. This restores to the expected behaviour, but seems like a bad UX to have to make this change.

jekyll-spaceship:
  mermaid-processor:
    mode: default  # mode value 'pre-fetch' for fetching image at building stage
    css:
      class: mermaid
    syntax:
      code: 'mermaid'
      custom: ['@startmermaid', '@endmermaid']
    config:
      theme: default
    src: https://mermaid.ink/svg/