fix regex, add test and changelog entry

This commit is contained in:
Gunther Schmidl 2020-07-30 22:42:31 +02:00
parent 4e93469421
commit 48d39ea11e
3 changed files with 6 additions and 1 deletions

View file

@ -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}'

View file

@ -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`

View file

@ -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