Markdown Monster
Puppet & mermaid
Gravatar is a globally recognized avatar based on your email address. Puppet & mermaid
  rumu
  All
  Jan 3, 2019 @ 01:00am

Hey,

thank you for this great software! I am evaluating it right now and stumbled upon this problems:

  • I can not get mermaid working. Example:
    graph TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[Car]
  • Syntax highlighting for puppet is not working. Example:
    package { 'openssh': ensure => present }

(It is rendered correct in this forum!)

Any help is appreciated! Regards

rumu

Gravatar is a globally recognized avatar based on your email address. re: Puppet & mermaid
  Rick Strahl
  rumu
  Jan 3, 2019 @ 01:23am

Hi rumu,

Mermaid won't properly preview in the MM internal previewer because it's effectively Internet Explorer which doesn't work properly with Mermaid. You can preview externally in your default browser and that should work although it won't be synced.

Puppet is not one of the supported languages packages we provide out of box. If you really need this you can build your own HighlightJs bundle from the HighlightJs site which includes the Puppet language. You can copy that package to the PreviewThemes\scripts\highlightjs folder to override the default highlight package.

Alternately if you just want to see the package as JSON either use JSON or just leave off the puppet directive:

package { 'openssh': ensure => present }

which is handled as JSON (both here and in MM which both use the exact same HighlightJs package).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Puppet & mermaid
  rumu
  Rick Strahl
  Jan 3, 2019 @ 04:58am

Hey Rick,

thank you for the fast reply!

The highlight.js trick works like a charm.

I found out that i have to enclose the mermaid code in <div class="mermaid"> CODE </div> and then the preview works in external browser engine (Chromium):

<div class="mermaid">
graph TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[Car]
</div>

Cheers

rumu

© 1996-2024