diff --git a/dailyreleases/main.py b/dailyreleases/main.py index be69b44..9aa8362 100644 --- a/dailyreleases/main.py +++ b/dailyreleases/main.py @@ -102,8 +102,9 @@ class DailyReleasesBot(object): "|iNTERNAL|Steam[._-]?Edition)", rls_name, flags=re.IGNORECASE) - # Prettify game name by substituting word delimiters with spaces and capitalizing each word - game_name = string.capwords(re.sub("[._-]", " ", game_name)) + # Prettify game name by substituting word delimiters with spaces and capitalizing each word. Delimiters + # separated by fewer than two letters are not substituted, to allow titles like "R.O.V.E.R." + game_name = string.capwords(re.sub("[._-]([a-zA-Z]{2,}|[0-9]+)", " \g<1>", game_name)) # Some stopwords are interesting enough to add next to the game in parentheses - we call these tags tags = [stopword