diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 84f1bf6c0..8bd96c7cf 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -236,12 +236,13 @@ def slug(text): 2. shift everything to lowercase 3. strip whitespace 4. replace other non-word characters with dashes + 5. strip extra dashes This somewhat duplicates the :func:`Google.slugify` function but slugify is not as generic as this one, which can be reused elsewhere. """ - return re.sub(r'\W+', '-', unidecode(text).lower().strip()) + return re.sub(r'\W+', '-', unidecode(text).lower().strip()).strip('-') class Backend(object):