From 3001d2cf9fba05816c79e68d3cf32919ca3c3ef5 Mon Sep 17 00:00:00 2001 From: Maricaya <915270549@qq.com> Date: Tue, 14 Jan 2025 16:16:02 -0600 Subject: [PATCH] fix: lint --- ci/release/changelogs/next.md | 2 +- d2cli/watch.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index fe803cce08..6b64ad66cc 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,8 +4,8 @@ - Connections now support `link` [#1955](https://github.com/terrastruct/d2/pull/1955) - Vars: vars in markdown blocks are substituted [#2218](https://github.com/terrastruct/d2/pull/2218) - Markdown: Github-flavored tables work in `md` blocks [#2221](https://github.com/terrastruct/d2/pull/2221) -- CLI: PNG output to stdout is supported using `--stdout-format png -` [#2260](https://github.com/terrastruct/d2/pull/2260) - `d2 fmt` now supports a `--check` flag [#2253](https://github.com/terrastruct/d2/pull/2253) +- CLI: PNG output to stdout is supported using `--stdout-format png -` [#2291](https://github.com/terrastruct/d2/pull/2291) #### Improvements 🧹 diff --git a/d2cli/watch.go b/d2cli/watch.go index 61b236348c..4b4ac179b6 100644 --- a/d2cli/watch.go +++ b/d2cli/watch.go @@ -57,6 +57,7 @@ type watcherOpts struct { forceAppendix bool pw png.Playwright fontFamily *d2fonts.FontFamily + outputFormat exportExtension } type watcher struct { @@ -430,7 +431,7 @@ func (w *watcher) compileLoop(ctx context.Context) error { if w.boardPath != "" { boardPath = strings.Split(w.boardPath, string(os.PathSeparator)) } - svg, _, err := compile(ctx, w.ms, w.plugins, &fs, w.layout, w.renderOpts, w.fontFamily, w.animateInterval, w.inputPath, w.outputPath, boardPath, false, w.bundle, w.forceAppendix, w.pw.Page) + svg, _, err := compile(ctx, w.ms, w.plugins, &fs, w.layout, w.renderOpts, w.fontFamily, w.animateInterval, w.inputPath, w.outputPath, boardPath, false, w.bundle, w.forceAppendix, w.pw.Page, w.outputFormat) w.boardpathMu.Unlock() errs := "" if err != nil {