Skip to content

Commit

Permalink
fix: titles with dots not matching
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalys committed Aug 20, 2024
1 parent ab398c0 commit 7307450
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sonalys/animeman

go 1.22
go 1.23

require (
github.com/rs/zerolog v1.32.0
Expand Down
1 change: 0 additions & 1 deletion internal/parser/title.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func TitleStrip(title string, cleanSubtitle bool) string {
if cleanSubtitle {
title = TitleStripSubtitle(title)
}
title = strings.ReplaceAll(title, ".", " ")
title = strings.ReplaceAll(title, "\"", "")
title = removeTags(title)
return strings.TrimSpace(title)
Expand Down
1 change: 1 addition & 0 deletions internal/parser/title_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func TestTitleStrip(t *testing.T) {
want string
}{
{name: "\"quoted\" title", title: "\"quoted\" title", want: "quoted title"},
{name: "title.with.dots", title: "title.with.dots", want: "title.with.dots"},
{name: "empty", title: "", want: ""},
{name: "multiple spaces", title: "My cool anime", want: "My cool anime"},
}
Expand Down

0 comments on commit 7307450

Please sign in to comment.