Skip to content

Commit

Permalink
Fix Letters Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
BasselArt committed Dec 29, 2024
1 parent 422a341 commit ed4a307
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/pkg/letteravatar/letteravatar.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ func Extract(name string) string {

// Check if it's an Arabic letter and convert if needed
if englishLetter, ok := arabicToEnglish[r]; ok {
return englishLetter
return englishLetter // Already uppercase in the map
}

return string(r)
// For non-Arabic letters, convert to uppercase
return strings.ToUpper(string(r))
}

// Draw generates a letter avatar image with the given size and text
Expand Down

0 comments on commit ed4a307

Please sign in to comment.