summaryrefslogtreecommitdiff
path: root/src/pattern.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pattern.go')
-rw-r--r--src/pattern.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pattern.go b/src/pattern.go
index c736be3c..11bed5f9 100644
--- a/src/pattern.go
+++ b/src/pattern.go
@@ -195,13 +195,9 @@ func parseTerms(fuzzy bool, caseMode Case, normalize bool, str string) []termSet
text = text[:len(text)-1]
}
- if fuzzy && len(text) > 2 && strings.HasPrefix(text, "'") && strings.HasSuffix(text, "'") ||
- !fuzzy && !strings.HasPrefix(text, "'") && strings.HasSuffix(text, "'") {
+ if len(text) > 2 && strings.HasPrefix(text, "'") && strings.HasSuffix(text, "'") {
typ = termExactBoundary
- if fuzzy {
- text = text[1:]
- }
- text = text[:len(text)-1]
+ text = text[1 : len(text)-1]
} else if strings.HasPrefix(text, "'") {
// Flip exactness
if fuzzy && !inv {