d2 icon indicating copy to clipboard operation
d2 copied to clipboard

fmt from stdout should always output the formatted diagram

Open jscarrott opened this issue 2 years ago • 3 comments

I want to use d2 to format on save in helix but as it outputs nothing if the doc is already formatted it can completely delete the diagram if I am not careful.

jscarrott avatar Sep 07 '23 13:09 jscarrott

oh true

alixander avatar Sep 07 '23 18:09 alixander

We should just conform to what https://pkg.go.dev/cmd/gofmt does.

alixander avatar Oct 05 '24 16:10 alixander