twitter: add hashtag normalization test.

Add test for #4243. Also fix warning from bootsnap:

    iseq.rb:18: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression: /(?<!\A)生誕祭(?:\d+)?\z/
This commit is contained in:
evazion
2020-01-05 17:36:04 -06:00
parent 692e5957a2
commit faeec18efc
2 changed files with 16 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ module Sources::Strategies
# The regexes will not match if there is nothing preceding
# the pattern to avoid creating empty strings.
COMMON_TAG_REGEXES = [
/(?<!\A)生誕祭(?:\d+)?\z/,
/(?<!\A)生誕祭(?:\d*)\z/,
/(?<!\A)版もうひとつの深夜の真剣お絵描き60分一本勝負(?:_\d+)?\z/,
/(?<!\A)版深夜の真剣お絵描き60分一本勝負(?:_\d+)?\z/,
/(?<!\A)深夜の真剣お絵描き60分一本勝負(?:_\d+)?\z/,