Avoid parsing the period at end of intent thread links. (#4331)
This commit is contained in:
Родитель
f6fa250cad
Коммит
0a338c0ce0
|
@ -124,11 +124,11 @@ def detect_gate_id(body) -> int | None:
|
||||||
THREAD_LINK_RE = re.compile(
|
THREAD_LINK_RE = re.compile(
|
||||||
r'To view this discussion on the web visit\s+'
|
r'To view this discussion on the web visit\s+'
|
||||||
r'(> )?(https://groups\.google\.com/a/chromium.org/d/msgid/blink-dev/'
|
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(
|
STAGING_THREAD_LINK_RE = re.compile(
|
||||||
r'To view this discussion on the web visit\s+'
|
r'To view this discussion on the web visit\s+'
|
||||||
r'(> )?(https://groups\.google\.com/d/msgid/jrobbins-test/'
|
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):
|
def detect_thread_url(body):
|
||||||
|
|
|
@ -286,7 +286,7 @@ class FunctionTest(testing_config.CustomTestCase):
|
||||||
'send an email to blink-dev+unsubscribe@chromium.org.\n'
|
'send an email to blink-dev+unsubscribe@chromium.org.\n'
|
||||||
'To view this discussion on the web visit https://groups.google.com'
|
'To view this discussion on the web visit https://groups.google.com'
|
||||||
'/a/chromium.org/d/msgid/blink-dev/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
'/a/chromium.org/d/msgid/blink-dev/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
||||||
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.')
|
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com. ')
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
('https://groups.google.com'
|
('https://groups.google.com'
|
||||||
'/a/chromium.org/d/msgid/blink-dev/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
'/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'
|
'send an email to jrobbins-test+unsubscribe@googlegroups.com.\n'
|
||||||
'To view this discussion on the web visit https://groups.google.com'
|
'To view this discussion on the web visit https://groups.google.com'
|
||||||
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
||||||
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.')
|
'-oNTb%2BZjiJk%2B6RNb9%2Bv05w%40mail.gmail.com.\n')
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
('https://groups.google.com'
|
('https://groups.google.com'
|
||||||
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
'/d/msgid/jrobbins-test/CAMO6jDPGfXfE5z6hJcWO112zX3We'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче