music: fix incorrect sort punct removal

Fix incorrect punctuation removal resulting in weird sorting behavior.
This commit is contained in:
Alexander Capehart 2023-04-16 17:55:02 -06:00
parent e6b00b1025
commit d0f8291085
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# Changelog # Changelog
## dev ## 3.0.5
#### What's Fixed #### What's Fixed
- Fixed inconsistent corner radius on widget - Fixed inconsistent corner radius on widget

View file

@ -407,7 +407,7 @@ class SortName(name: String, musicSettings: MusicSettings) : Comparable<SortName
private companion object { private companion object {
val COLLATOR: Collator = Collator.getInstance().apply { strength = Collator.PRIMARY } val COLLATOR: Collator = Collator.getInstance().apply { strength = Collator.PRIMARY }
val LEADING_PUNCTUATION_REGEX = Regex("[^\\p{Punct}+]") val LEADING_PUNCTUATION_REGEX = Regex("[\\p{Punct}+]")
val CONSECUTIVE_DIGITS_REGEX = Regex("\\d+") val CONSECUTIVE_DIGITS_REGEX = Regex("\\d+")
} }
} }