diff --git a/beetsplug/the.py b/beetsplug/the.py index 238aec32f..dfc58817d 100644 --- a/beetsplug/the.py +++ b/beetsplug/the.py @@ -23,7 +23,7 @@ from beets.plugins import BeetsPlugin __author__ = 'baobab@heresiarch.info' __version__ = '1.1' -PATTERN_THE = u'^[the]{3}\\s' +PATTERN_THE = u'^the\\s' PATTERN_A = u'^[a][n]?\\s' FORMAT = u'{0}, {1}' diff --git a/docs/changelog.rst b/docs/changelog.rst index 64e6ab85c..4a87f7f07 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -145,6 +145,9 @@ New features: Fixes: +* :doc:`/plugins/the`: Fixed incorrect regex for 'the' that matched any + 3-letter combination of the letters t, h, e. + :bug:`3701` * :doc:`/plugins/fetchart`: Fixed a bug that caused fetchart to not take environment variables such as proxy servers into account when making requests :bug:`3450` diff --git a/test/test_the.py b/test/test_the.py index 263446b92..1fc488953 100644 --- a/test/test_the.py +++ b/test/test_the.py @@ -36,6 +36,8 @@ class ThePluginTest(_common.TestCase): u'A Thing, An') self.assertEqual(ThePlugin().unthe(u'the An Arse', PATTERN_A), u'the An Arse') + self.assertEqual(ThePlugin().unthe(u'TET - Travailleur', PATTERN_THE), + u'TET - Travailleur') def test_unthe_with_strip(self): config['the']['strip'] = True