Closed uhooi closed 1 year ago
オプションにスペースを入れる対象の配列を指定できるようになりました。
Refs: v2.3.0
{
"rules": {
"ja-space-between-half-and-full-width": {
"space": ["alphabets"]
}
}
}
>>> cat old.md
## テスト
2022年7月7日、本日は晴天なり。
りんごは英語でAppleという。
>>> cat old.md | npx textlint --stdin --stdin-filename README.md --fix --format fixed-result --output-file new.md
>>> cat new.md
## テスト
2022年7月7日、本日は晴天なり。
りんごは英語で Apple という。
なんと…!?ご対応ありがとうございます、嬉しいです🙇
textlint-rule-ja-space-between-half-and-full-width
ルールは、デフォルトでアルファベットと数字の両方に適用されます。 https://github.com/textlint-ja/textlint-rule-preset-ja-spacing/tree/master/packages/textlint-rule-ja-space-between-half-and-full-widthアルファベットのみ適用し、数字は無視する設定が欲しいです。
例
適用前
適用後
このように「2022年7月7日」はそのままで、「Apple」の前後のみに半角スペースを入れたいです。