Skip to content

Markdown not rendering properly #2488

@czardien

Description

@czardien

Hi,

I'm using d2 from the official Archlinux package: here, and I can't get markdown to render on my machine. I'm using pretty vanilla examples from the docs, and when I paste the same d2 code in the playground it renders properly.

I'm not sure if I'm missing a dependency or a configuration tweak or whatnot. I enabled debug logging but nothing jumps out to me. Can you please help with this?

Thank you!

Playground link: here.

SVG image from my machine:

Image

Debug logs on my machine:

$ d2 -d git.md.d2 && ristretto git.md.svg
debug: using theme Neutral Default (ID: 0)
2025-04-09T11:32:33+01:00 DEBUG default layout rootlevel=0 shapes=Objects: [start, git, report, git.explanation, ]
2025-04-09T11:32:33+01:00 DEBUG done rootlevel=0 shapes=Objects: [start, git, report, git.explanation, ]
debug: using layout plugin dagre (bundled)
success: successfully compiled git.md.d2 to git.md.svg in 277.23729ms

d2 version on my machine:

$ d2 --version
0.6.9

My d2 file:

direction: right

start -> git -> report

git: {
  explanation: |md
    ## How-to's

    Read user input:

    ```bash
    read -p "Enter fullname: " fullname
    ```
  |
}

report: |md
  # Report card

  - Computer science: B
  - Diagram making: A+
|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions