Skip to content

Commit

Permalink
Fix quoting of any argument which contains 'n'.
Browse files Browse the repository at this point in the history
  • Loading branch information
kormat committed Nov 12, 2018
1 parent aeb535a commit ee69fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmt15.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func FmtValue(val interface{}) string {
switch {
case strings.ContainsRune(s, '\n'):
return FmtMultiLine(s)
case strings.ContainsAny(s, " \\n"):
case strings.ContainsAny(s, " \\"):
return fmt.Sprintf("\"%v\"", s)
case s == "":
return "\"\""
Expand Down

0 comments on commit ee69fec

Please sign in to comment.