Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
- Fixed the fact that my previos solution to double spaces didn't cat…
Browse files Browse the repository at this point in the history
…ch triple+ spaces
  • Loading branch information
Mark Kubiak committed Oct 29, 2014
1 parent bf1af88 commit 68d0dd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wallpaper-reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,12 @@ def remove_tags(str):
if i == ')':
tag = False
#removes any double spaces (from previous removals) and any spaces at the beginning and end
title = str2.replace(' ', ' ').strip()
title = ''
for i in range(len(str2) - 1):
if not(str2[i] == ' ' and str2[i+1] == ' '):
title = title + str2[i]
title = title + str2[len(str2) - 1]
title = title.strip()
return title

#saves the wallpaper in the save directory from the config
Expand Down

0 comments on commit 68d0dd8

Please sign in to comment.