From 57231f78c02cf6dca47032b120ab0efbdae851b7 Mon Sep 17 00:00:00 2001 From: Nick Arellano Date: Mon, 26 Sep 2022 14:51:00 -0500 Subject: [PATCH] Migrate from generic styles to using Tailwind classes, implement dark mode background color --- payloads/DumpPayload.go | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/payloads/DumpPayload.go b/payloads/DumpPayload.go index 822cc97..74fe3dc 100644 --- a/payloads/DumpPayload.go +++ b/payloads/DumpPayload.go @@ -1,24 +1,19 @@ package payloads import ( + "strings" + "github.com/davecgh/go-spew/spew" "github.com/gomarkdown/markdown" ) // NewDumpPayload creates a new Dump Payload func NewDumpPayload(value interface{}) Payload { - style := ` - ` - md := []byte("``` \n"+spew.Sdump(value)+"\n```") + md := []byte("``` \n" + spew.Sdump(value) + "\n```") output := markdown.ToHTML(md, nil, nil) - return NewCustomPayload(style+`
`+string(output) + "
", "") + styledOutput := strings.Replace(string(output), "
", strings.Join([]string{
+		`
`,
+		``,
+	}, ""), 1)
+	return NewCustomPayload(styledOutput, "")
 }