Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Codeと句読点 が並んだ場合に、が無視される問題を修正 #53

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/no-doubled-joshi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const report: TextlintRuleModule<Options> = function (context, options = {}) {
* このルールでは単純に無視したいので、同じ文字数で意味のない文字列に置き換える
*/
if (node.type === Syntax.Code) {
return maskValue("_");
return maskValue("");
}
return;
}
Expand Down
3 changes: 3 additions & 0 deletions test/no-doubled-joshi-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ tester.run("no-double-joshi", rule, {
"昨日は「今日は早朝から出発したが、定刻には間に合わなかった。定刻には間に合わなかったが、無事会場に到着した」と思った",
"「今日は早朝から出発したが、定刻には間に合わなかった。定刻には間に合わなかったが、無事会場に到着した」",
`"今日は早朝から出発したが、定刻には間に合わなかった。定刻には間に合わなかったが、無事会場に到着した"`,
// `Code`、となった場合に、`、`が間隔値として扱われない問題のテスト
// https://github.com/textlint-ja/textlint-rule-no-doubled-joshi/issues/52
"関数宣言で関数`fn1`、関数式で関数`fn2`を定義する",
// 格助詞の種類が異なる
// "プロパティを削除しようとするとエラーが発生します。",
// 「でも」と「も」は並列としても扱うケースがある
Expand Down