Skip to content

Commit

Permalink
fix: quote strings starting with @ (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
10io committed Mar 28, 2023
1 parent 8ab4645 commit 9a80dbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion token/token.go
Expand Up @@ -623,7 +623,7 @@ func IsNeedQuoted(value string) bool {
}
first := value[0]
switch first {
case '*', '&', '[', '{', '}', ']', ',', '!', '|', '>', '%', '\'', '"':
case '*', '&', '[', '{', '}', ']', ',', '!', '|', '>', '%', '\'', '"', '@':
return true
}
last := value[len(value)-1]
Expand Down
1 change: 1 addition & 0 deletions token/token_test.go
Expand Up @@ -117,6 +117,7 @@ func TestIsNeedQuoted(t *testing.T) {
"off",
"Off",
"OFF",
"@test",
}
for i, test := range needQuotedTests {
if !token.IsNeedQuoted(test) {
Expand Down

0 comments on commit 9a80dbc

Please sign in to comment.