From d4031a62d367c18e2d176d3464585ebb7f66c049 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Thu, 2 Jun 2011 22:13:32 +0100 Subject: [PATCH] More apostrophes --- openlp/plugins/songs/lib/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py index 323db9fe4..05e402776 100644 --- a/openlp/plugins/songs/lib/__init__.py +++ b/openlp/plugins/songs/lib/__init__.py @@ -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): """