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

2.2.2: 「11種類」が「1一種類」に修正されてしまう #65

Closed
superbrothers opened this issue Jan 21, 2019 · 3 comments · Fixed by #66
Closed

2.2.2: 「11種類」が「1一種類」に修正されてしまう #65

superbrothers opened this issue Jan 21, 2019 · 3 comments · Fixed by #66
Labels
Type: Bug Bug or Bug fixes

Comments

@superbrothers
Copy link

問題:

「2.2.2 算用数字と漢数字の使い分け」で「11種類」が慣用句の「一種」と判断されてしまうことで、「1一種類」と修正されてしまいます。

期待する結果:

「11種類」のまま変更されない。

再現手順:

$ echo 11種類 > index.md
$ npm install [email protected] [email protected]
$ $(npm bin)/textlint --preset textlint-rule-preset-jtf-style index.md --fix --dry-run -f diff

/tmp/tmp.pmxgOAbbWv/index.md
- 11種類
+ 1一種類


✔ Fixed 1 problem
@azu azu added the Type: Bug Bug or Bug fixes label Jan 22, 2019
@azu
Copy link
Member

azu commented Jan 22, 2019

なるほど 一種 の判定が誤検知しているのが原因みたいですね。
1種[助詞] に制限するのが安全そうですね

matchToReplace(text, /(1)種/g, toKanNumber);

@azu
Copy link
Member

azu commented Jan 31, 2019

v2.3.3で修正しました。
ご確認ください。

@superbrothers
Copy link
Author

v2.3.3 にアップグレードし修正されていることを確認しました。ありがとうございます!🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
2 participants