diff --git a/internal/explore/render.go b/internal/explore/render.go index c65769c..eea5732 100644 --- a/internal/explore/render.go +++ b/internal/explore/render.go @@ -25,6 +25,7 @@ const ( cosignPointee = `application/vnd.dev.ggcr.magic/cosign-thing+json` emptyDigest = "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" hcsshim = `https://github.com/microsoft/hcsshim/blob/main/osversion/windowsbuilds.go` + indent = "\u00a0\u00a0" // non-breaking spaces for copyable indentation ) type jsonOutputter struct { @@ -168,7 +169,7 @@ func (w *jsonOutputter) EndMap() { } w.pop() w.newline() - w.Print(w.tabs() + "}") + w.Printf("%s}", w.tabs()) w.key = false w.name = "" w.unfresh() @@ -188,7 +189,7 @@ func (w *jsonOutputter) EndArray() { } w.pop() w.newline() - w.Print(w.tabs() + "]") + w.Printf("%s]", w.tabs()) w.key = false w.unfresh() } @@ -223,14 +224,13 @@ func (w *jsonOutputter) Fresh() bool { } func (w *jsonOutputter) push() { - w.Print(w.tabs() + `