Skip to content
This repository was archived by the owner on Dec 26, 2024. It is now read-only.

Commit 8b8b17a

Browse files
authored
fix(processor): What If not getting processed correctly (#73)
1 parent e23124b commit 8b8b17a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

internal/processor/title.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func processTitle(title string, matchRelease bool) []string {
1919
t := NewTitleSlice()
2020

2121
// Regex patterns
22-
replaceRegexp := regexp.MustCompile(`[[:punct:]\s\x{00a0}\x{2000}-\x{200f}\x{2028}-\x{202f}\x{205f}-\x{206f}à-üÀ-Ü]`)
22+
replaceRegexp := regexp.MustCompile(`[[:punct:]\s\x{00a0}\x{2000}-\x{200f}\x{2026}-\x{202f}\x{205f}-\x{206f}à-üÀ-Ü]`)
2323
questionmarkRegexp := regexp.MustCompile(`[?]{2,}`)
2424
regionCodeRegexp := regexp.MustCompile(`\(.+\)$`)
2525
parenthesesEndRegexp := regexp.MustCompile(`\)$`)

internal/processor/title_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ func Test_processTitle(t *testing.T) {
200200
},
201201
want: []string{"Whose?Line?Is?It?Anyway", "Whose?Line?Is?It?Anyway?", "Whose?Line?Is?It?Anyway*US*1932", "Whose?Line?Is?It?Anyway*US*1932?"},
202202
},
203+
{
204+
name: "test_24",
205+
args: args{
206+
title: "What If…?",
207+
matchRelease: false,
208+
},
209+
want: []string{"What?If", "What?If*"},
210+
},
203211
}
204212
for _, tt := range tests {
205213
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)