diff options
Diffstat (limited to 'vendor/codeberg.org/gruf/go-kv/format/format.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-kv/format/format.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/codeberg.org/gruf/go-kv/format/format.go b/vendor/codeberg.org/gruf/go-kv/format/format.go index df5a94b7c..7edc4475f 100644 --- a/vendor/codeberg.org/gruf/go-kv/format/format.go +++ b/vendor/codeberg.org/gruf/go-kv/format/format.go @@ -311,7 +311,7 @@ func (f format) AppendString(s string) { } func (f format) AppendStringKey(s string) { - if !strconv.CanBackquote(s) { + if len(s) > SingleTermLine || !strconv.CanBackquote(s) { // Requires quoting AND escaping f.Buffer.B = strconv.AppendQuote(f.Buffer.B, s) } else if ContainsDoubleQuote(s) { @@ -329,7 +329,7 @@ func (f format) AppendStringKey(s string) { } func (f format) AppendStringQuoted(s string) { - if !strconv.CanBackquote(s) { + if len(s) > SingleTermLine || !strconv.CanBackquote(s) { // Requires quoting AND escaping f.Buffer.B = strconv.AppendQuote(f.Buffer.B, s) } else if ContainsDoubleQuote(s) { |