Skip to content

Add configurable D2 SVG output with bundling support - #1

Merged
mnowotnik merged 1 commit into
feature/svg-supportfrom
claude/check-d2-test-changes-q1Xfa
Feb 8, 2026
Merged

Add configurable D2 SVG output with bundling support#1
mnowotnik merged 1 commit into
feature/svg-supportfrom
claude/check-d2-test-changes-q1Xfa

Conversation

@mnowotnik

Copy link
Copy Markdown
Owner

Changes:

  • d2/d2.go: add SVG bundling via imgbundler, scale-aware dimensions, and adapter logger
  • renderer/fencedcodeblock.go: pass file path, bundle flag, and scale through SVG code path
  • markdown/markdown.go: wire new fenced-code renderer signature
  • util/flags.go, util/cli.go, types/types.go: introduce d2-output/d2-bundle config and propagate to MarkConfig
  • d2/d2_test.go: cover SVG path and checksum expectations
  • README.md: document new d2-output and d2-bundle options
  • go.mod/go.sum: pull in new indirect deps
  • main.go: remove stray blank line

Why:

  • Allow uploading original D2 SVGs with optional bundled assets and respect scaling to avoid manual resizing.

@mnowotnik
mnowotnik changed the base branch from master to feature/svg-support February 8, 2026 16:44
@mnowotnik
mnowotnik merged commit 062e28b into feature/svg-support Feb 8, 2026
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

Successfully merging this pull request may close these issues.

2 participants