Skip to content

Commit

Permalink
Ooh, null filter
Browse files Browse the repository at this point in the history
  • Loading branch information
clipperhouse committed Apr 9, 2020
1 parent 701df22 commit b72b412
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/jargon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ func setFilters(c *config, args []string, lang string) error {
// Loop through filters; order matters, so can't use flag package
for _, arg := range args {
filter, found := filterMap[arg]
if found && arg == "-stem" {
// Look for a language specification
if lang != "" {
if found {
if arg == "-stem" && lang != "" {
// Look for a language specification
stem, found := stemmerMap[lang]
if found {
filter = stem
Expand All @@ -185,8 +185,8 @@ func setFilters(c *config, args []string, lang string) error {
return err
}
}
c.Filters = append(c.Filters, filter)
}
c.Filters = append(c.Filters, filter)
}

return nil
Expand Down

0 comments on commit b72b412

Please sign in to comment.