Skip to content

Commit 7640a54

Browse files
committed
Merge pull request #5 from takahashim/nonstrict-conjunctive-particle-te
allow doubled conjunctive particle "te" in non-strict mode
2 parents 332d8c1 + a2531aa commit 7640a54

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/no-doubled-joshi.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ function matchExceptionRule(tokens) {
4141
if (token.pos_detail_1 === "格助詞" && token.surface_form === "を") {
4242
return true;
4343
}
44+
// 接続助詞 "て" の重なりは例外
45+
if (token.pos_detail_1 === "接続助詞" && token.surface_form === "て") {
46+
return true;
47+
}
4448
return false;
4549
}
4650
/*
@@ -140,4 +144,4 @@ export default function (context, options = {}) {
140144
});
141145
}
142146
}
143-
};
147+
};

test/no-doubled-joshi-test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ tester.run("no-double-joshi", rule, {
1010
"私は彼の鼻は好きだ",
1111
// 、 tokenを距離 + 1 として考える
1212
"右がiPhone、左がAndroidです。",
13-
"ナイフで切断した後、ハンマーで破砕した。"
13+
"ナイフで切断した後、ハンマーで破砕した。",
14+
"まずは試していただいて"
1415
],
1516
invalid: [
1617
{
@@ -123,4 +124,4 @@ tester.run("no-double-joshi", rule, {
123124
]
124125
}
125126
]
126-
});
127+
});

0 commit comments

Comments
 (0)