diff --git a/cmd/qrbill-api/debughtml.go b/cmd/qrbill-api/debughtml.go index 2955b40..a4947be 100644 --- a/cmd/qrbill-api/debughtml.go +++ b/cmd/qrbill-api/debughtml.go @@ -30,7 +30,7 @@ import ( var ( fieldNameRe = regexp.MustCompile(`
( )*([^:]+):`) stringLiteralRe = regexp.MustCompile(`"([^"]*)"`) - parenRe = regexp.MustCompile(`\(([^)]+)\) `) + typeInfoRe = regexp.MustCompile(`(
( )*([^:]+): )[^"{]+`) ) var tmpl = template.Must(template.New("").Parse(` @@ -203,7 +203,7 @@ func debugHTML(w http.ResponseWriter, r *http.Request, prefix string, qrch *qrbi sp := spew.Sdump(vars...) sp = strings.ReplaceAll(sp, "\n", "
") sp = strings.ReplaceAll(sp, " ", " ") - sp = parenRe.ReplaceAllString(sp, "") + sp = typeInfoRe.ReplaceAllString(sp, "$1") sp = stringLiteralRe.ReplaceAllStringFunc(sp, func(stringLiteral string) string { return `` + stringLiteral + "" })