Skip to content

Commit 9bf32b8

Browse files
committed
fix: 春A-C、夏季、秋A-C、春季、通年の順番に変更
1 parent 67e6baf commit 9bf32b8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/parser.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const analyzeDayAndPeriod = (str: string): { day: Day; period: number }[] => {
6060
*/
6161
const analyzeModule = (str: string): Module[] => {
6262
const result: Module[] = []
63+
6364

6465
/*
6566
/春[ABC]*A/は春A 春AB 春ABCに
@@ -70,15 +71,17 @@ const analyzeModule = (str: string): Module[] => {
7071
if (/[ABC]*B/gm.test(str)) result.push(Module.SpringB)
7172
if (/[ABC]*C/gm.test(str)) result.push(Module.SpringC)
7273

73-
// 春季休業中のマッチング
74-
if (str.includes(Module.SpringVacation)) result.push(Module.SpringVacation)
74+
// 夏季休業中、通年のマッチング
75+
if (str.includes(Module.SummerVacation)) result.push(Module.SummerVacation)
7576

7677
if (/[ABC]*A/gm.test(str)) result.push(Module.FallA)
7778
if (/[ABC]*B/gm.test(str)) result.push(Module.FallB)
7879
if (/[ABC]*C/gm.test(str)) result.push(Module.FallC)
80+
81+
// 春季休業中のマッチング
82+
if (str.includes(Module.SpringVacation)) result.push(Module.SpringVacation)
7983

80-
// 秋季休業中、通年のマッチング
81-
if (str.includes(Module.SummerVacation)) result.push(Module.SummerVacation)
84+
// 通年のマッチング
8285
if (str.includes(Module.Annual)) result.push(Module.Annual)
8386

8487
//どのモジュールにも判定されなかったが空文字ではない場合、仮にunknownとする

0 commit comments

Comments
 (0)