X Tutup
Skip to content

Commit 39f21ad

Browse files
committed
Simplify logic a bit
1 parent 839eb0e commit 39f21ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/cmd/pr/shared/params.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,23 +228,23 @@ func SearchQueryBuild(options FilterOptions) string {
228228
}
229229

230230
func splitKeywords(keywords string) []string {
231-
a := []string{}
231+
ks := []string{}
232232
sb := &strings.Builder{}
233233
quoted := false
234234
for _, r := range keywords {
235-
if r == '"' || r == '\'' {
235+
if r == '"' {
236236
quoted = !quoted
237237
} else if !quoted && r == ' ' {
238-
a = append(a, sb.String())
238+
ks = append(ks, sb.String())
239239
sb.Reset()
240240
} else {
241241
sb.WriteRune(r)
242242
}
243243
}
244244
if sb.Len() > 0 {
245-
a = append(a, sb.String())
245+
ks = append(ks, sb.String())
246246
}
247-
return a
247+
return ks
248248
}
249249

250250
func QueryHasStateClause(searchQuery string) bool {

0 commit comments

Comments
 (0)
X Tutup