File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,7 @@ const analyzeDayAndPeriod = (str: string): { day: Day; period: number }[] => {
60
60
*/
61
61
const analyzeModule = ( str : string ) : Module [ ] => {
62
62
const result : Module [ ] = [ ]
63
-
64
- // 特殊系のマッチング(通年、夏季休業中、春季休業中)
65
- if ( str . includes ( Module . Annual ) ) result . push ( Module . Annual )
66
- if ( str . includes ( Module . SpringVacation ) ) result . push ( Module . SpringVacation )
67
- if ( str . includes ( Module . SummerVacation ) ) result . push ( Module . SummerVacation )
68
-
63
+
69
64
/*
70
65
/春[ABC]*A/は春A 春AB 春ABCに
71
66
/春[ABC]*B/は春B 春AB 春BCに
@@ -74,11 +69,16 @@ const analyzeModule = (str: string): Module[] => {
74
69
if ( / 春 [ A B C ] * A / gm. test ( str ) ) result . push ( Module . SpringA )
75
70
if ( / 春 [ A B C ] * B / gm. test ( str ) ) result . push ( Module . SpringB )
76
71
if ( / 春 [ A B C ] * C / gm. test ( str ) ) result . push ( Module . SpringC )
77
-
72
+
78
73
if ( / 秋 [ A B C ] * A / gm. test ( str ) ) result . push ( Module . FallA )
79
74
if ( / 秋 [ A B C ] * B / gm. test ( str ) ) result . push ( Module . FallB )
80
75
if ( / 秋 [ A B C ] * C / gm. test ( str ) ) result . push ( Module . FallC )
81
76
77
+ // 特殊系のマッチング(通年、夏季休業中、春季休業中)
78
+ if ( str . includes ( Module . Annual ) ) result . push ( Module . Annual )
79
+ if ( str . includes ( Module . SpringVacation ) ) result . push ( Module . SpringVacation )
80
+ if ( str . includes ( Module . SummerVacation ) ) result . push ( Module . SummerVacation )
81
+
82
82
//どのモジュールにも判定されなかったが空文字ではない場合、仮にunknownとする
83
83
if ( str !== '' && result . length === 0 ) result . push ( Module . Unknown )
84
84
You can’t perform that action at this time.
0 commit comments