File tree 1 file changed +6
-8
lines changed 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ const regexForAxc = /^(abc|arc|agc)(\d{3})/i;
275
275
* - "ttpc2022"
276
276
* - "tupc2023"
277
277
*/
278
- const regexForAtCoderUniversity = / ^ ( u t | t t | t u ) ( p c ) ( \d { 4 } ) / ;
278
+ const regexForAtCoderUniversity = / ^ ( u t | t t | t u ) ( p c ) ( \d { 4 } ) / i ;
279
279
280
280
export const getContestNameLabel = ( contestId : string ) => {
281
281
// AtCoder
@@ -314,7 +314,7 @@ export const getContestNameLabel = (contestId: string) => {
314
314
return 'アルゴリズムと数学' ;
315
315
}
316
316
317
- if ( atCoderUniversityPrefixes . some ( ( prefix ) => contestId . startsWith ( prefix ) ) ) {
317
+ if ( regexForAtCoderUniversity . exec ( contestId ) ) {
318
318
return getAtCoderUniversityContestLabel ( contestId ) ;
319
319
}
320
320
@@ -356,8 +356,6 @@ export function getAtCoderUniversityContestLabel(contestId: string): string {
356
356
) ;
357
357
}
358
358
359
- const SPACE = ' ' ;
360
-
361
359
/**
362
360
* Maps PCK contest type abbreviations to their Japanese translations.
363
361
*
@@ -370,8 +368,8 @@ const SPACE = ' ';
370
368
*/
371
369
const PCK_TRANSLATIONS = {
372
370
PCK : 'パソコン甲子園' ,
373
- Prelim : SPACE + '予選' + SPACE ,
374
- Final : SPACE + '本選' + SPACE ,
371
+ Prelim : ' 予選 ' ,
372
+ Final : ' 本選 ' ,
375
373
} ;
376
374
377
375
/**
@@ -384,8 +382,8 @@ const PCK_TRANSLATIONS = {
384
382
* }
385
383
*/
386
384
const JAG_TRANSLATIONS = {
387
- Prelim : SPACE + ' 模擬国内' + SPACE ,
388
- Regional : SPACE + ' 模擬地区' + SPACE ,
385
+ Prelim : ' 模擬国内 ' ,
386
+ Regional : ' 模擬地区 ' ,
389
387
} ;
390
388
391
389
const aojBaseLabel = 'AOJ - ' ;
You can’t perform that action at this time.
0 commit comments