diff --git a/internal/model/commit_message.go b/internal/model/commit_message.go index 22ed110..2d28a43 100644 --- a/internal/model/commit_message.go +++ b/internal/model/commit_message.go @@ -19,7 +19,7 @@ func CreateCommitMessageFrom(messageLines []string) *CommitMessage { } func (cm *CommitMessage) ValidateSubject() int { - currentSubjectLength := len(cm.Subject) + currentSubjectLength := len([]rune(cm.Subject)) if strings.HasPrefix(cm.Subject, "Merge ") { return 0 diff --git a/internal/model/commit_message_test.go b/internal/model/commit_message_test.go index 5b405ae..da532d7 100644 --- a/internal/model/commit_message_test.go +++ b/internal/model/commit_message_test.go @@ -66,6 +66,7 @@ func TestNewCommitMessage(t *testing.T) { {"short subject line", 0}, {"Merge pull request commits are ignored because they can easily exceed 52 characters", 0}, {"Merge branch commits are also ignored..............................................", 0}, + {"I am a commit containing an umlaut ΓΌ.................", 3}, } for _, tc := range testcases {