Skip to content

Commit 5c4451d

Browse files
committed
fix: 週に複数回ある授業が上手くパースできない
1 parent 33d5dd8 commit 5c4451d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twinte-parser",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Twinte内部で使用するために開発されたKdBパーサ",
55
"private": false,
66
"main": "dist/index.js",

src/parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const analyzeDayAndPeriod = (str: string): { day: Day; period: number }[] => {
2020
例1: 月1,2 は、月.*1と月.*2のテストに合格する
2121
例2: 月・水3は、月.*3と水.*3のテストに合格する
2222
*/
23-
if (new RegExp(`${day}[0-9,・]*` + i).test(str)) {
23+
if (new RegExp(`${day}.*${i}`).test(str)) {
2424
result.push({
2525
day: day,
2626
period: i

0 commit comments

Comments
 (0)