Avoid parsing the period at end of intent thread links. (#4331)

This commit is contained in:
Jason Robbins 2024-09-04 11:11:21 -07:00 коммит произвёл GitHub
Родитель f6fa250cad
Коммит 0a338c0ce0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -124,11 +124,11 @@ def detect_gate_id(body) -> int | None:
THREAD_LINK_RE = re.compile(
r'To view this discussion on the web visit\s+'
r'(> )?(https://groups\.google\.com/a/chromium.org/d/msgid/blink-dev/'
r'\S+)[\r\n> .]', re.MULTILINE)
r'[-_0-9a-zA-Z%.]+[-_0-9a-zA-Z])', re.MULTILINE)
STAGING_THREAD_LINK_RE = re.compile(
r'To view this discussion on the web visit\s+'
r'(> )?(https://groups\.google\.com/d/msgid/jrobbins-test/'
r'\S+)[\r\n> .]', re.MULTILINE)
r'[-_0-9a-zA-Z%.]+[-_0-9a-zA-Z])', re.MULTILINE)
def detect_thread_url(body):

Просмотреть файл

@ -286,7 +286,7 @@ class FunctionTest(testing_config.CustomTestCase):
'send an email to blink-dev+unsubscribe@chromium.org.\n'
'To view this discussion on the web visit https://groups.google.com'
'/a/chromium.org/d/msgid/blink-dev/CAMO6jDPGfXfE5z6hJcWO112zX3We'
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.')
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com. ')
self.assertEqual(
('https://groups.google.com'
'/a/chromium.org/d/msgid/blink-dev/CAMO6jDPGfXfE5z6hJcWO112zX3We'
@ -352,7 +352,7 @@ class FunctionTest(testing_config.CustomTestCase):
'send an email to jrobbins-test+unsubscribe@googlegroups.com.\n'
'To view this discussion on the web visit https://groups.google.com'
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.')
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.\n')
self.assertEqual(
('https://groups.google.com'
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'