More apostrophes

This commit is contained in:
Jonathan Corwin 2011-06-02 22:13:32 +01:00
parent 364de1af86
commit d4031a62d3
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ from db import Author
from ui import SongStrings
WHITESPACE = re.compile(r'[\W_]+', re.UNICODE)
APOSTROPHE = re.compile(u'[\'`ʻ]', re.UNICODE)
class VerseType(object):
"""
@ -252,7 +253,7 @@ def clean_string(string):
"""
Strips punctuation from the passed string to assist searching
"""
return WHITESPACE.sub(u' ', string.replace(u'\'', u'')).lower()
return WHITESPACE.sub(u' ', APOSTROPHE.sub(u'', string)).lower()
def clean_song(manager, song):
"""