Quote tags before printing them out. (#2211)

This commit is contained in:
Todd authored and GitHub committed 2022-06-16 14:13:13 -07:00
1 parent 9671daf6e0
commit eb37fc8d07
1 file changed
+9
+9
View File
@@ -139,6 +139,15 @@ func WrapMap(prefixSpaces, maxLengthOverride int, input map[string]interface{})
if spaces < 0 {
spaces = 0
}
if sv, ok := v.([]string); ok {
nv := make([]string, 0, len(sv))
for _, si := range sv {
nv = append(nv, fmt.Sprintf("%q", si))
}
v = nv
}
vOut := fmt.Sprintf("%v", v)
switch v.(type) {
case map[string]interface{}: