diff --git a/encode_test.go b/encode_test.go index 9ca4404..74388b9 100644 --- a/encode_test.go +++ b/encode_test.go @@ -338,6 +338,11 @@ func TestEncoder(t *testing.T) { map[string]string{"a": " b "}, nil, }, + { + "a: \"`b` c\"\n", + map[string]string{"a": "`b` c"}, + nil, + }, { "a: 100.5\n", map[string]interface{}{ diff --git a/token/token.go b/token/token.go index c86caab..14d7622 100644 --- a/token/token.go +++ b/token/token.go @@ -623,7 +623,7 @@ func IsNeedQuoted(value string) bool { } first := value[0] switch first { - case '*', '&', '[', '{', '}', ']', ',', '!', '|', '>', '%', '\'', '"', '@', ' ': + case '*', '&', '[', '{', '}', ']', ',', '!', '|', '>', '%', '\'', '"', '@', ' ', '`': return true } last := value[len(value)-1]