Quote tags before printing them out. (#2211)

pull/2209/head
Todd 4 years ago committed by GitHub
parent 9671daf6e0
commit eb37fc8d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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{}:

Loading…
Cancel
Save