Compare commits

..

No commits in common. "974a4c79fc8f32e56ca27eee03d33aa6140366b5" and "5d866a74e308f559d2ef7e79cb47908147f2f553" have entirely different histories.

4 changed files with 5 additions and 14 deletions

View File

@ -117,7 +117,6 @@ Flags:
-b, --bind string address to bind to (default "0.0.0.0")
-c, --cache generate directory cache at startup
--cache-file string path to optional persistent cache file
--case-sensitive use case-sensitive matching for filters
--code enable support for source code files
--code-theme string theme for source code syntax highlighting (default "solarized-dark256")
--exit-on-error shut down webserver on error, instead of just printing the error

View File

@ -42,11 +42,7 @@ func (filters *filters) apply(fileList []string) []string {
if filters.hasExcludes() {
for _, exclude := range filters.excluded {
result = slices.DeleteFunc(fileList, func(s string) bool {
if CaseSensitive {
return strings.Contains(s, exclude)
} else {
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
}
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
})
}
}
@ -54,11 +50,7 @@ func (filters *filters) apply(fileList []string) []string {
if filters.hasIncludes() {
for _, include := range filters.included {
result = slices.DeleteFunc(fileList, func(s string) bool {
if CaseSensitive {
return !strings.Contains(s, include)
} else {
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
}
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
})
}
}

View File

@ -11,7 +11,7 @@ import (
)
const (
ReleaseVersion string = "0.92.2"
ReleaseVersion string = "0.92.0"
)
var (

View File

@ -49,9 +49,9 @@ func splitQueryParams(query string, regexes *regexes) []string {
for i := 0; i < len(params); i++ {
switch {
case regexes.alphanumeric.MatchString(params[i]) && CaseSensitive:
results = append(results, params[i])
case regexes.alphanumeric.MatchString(params[i]):
results = append(results, strings.ToLower(params[i]))
case regexes.alphanumeric.MatchString(params[i]):
results = append(results, params[i])
}
}