textlint-rule-general-novel-style-ja icon indicating copy to clipboard operation
textlint-rule-general-novel-style-ja copied to clipboard

閉じかっこの直前にある連続した句読点の扱いについて

Open massongit opened this issue 4 years ago • 1 comments

masterブランチでテストを実行すると、以下のテストケースで失敗します。

https://github.com/io-monad/textlint-rule-general-novel-style-ja/blob/6b1a52876842f1a07f1ea1b11d3af6d963bc20ce/test/general-novel-style-test.js#L246-L261

$ yarn test
...
  1) general-novel-style Fixer: 「こんにちは、世界。。。」:

      AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ '「こんにちは、世界……」'
- '「こんにちは、世界」'
            ^
      + expected - actual

      -「こんにちは、世界……」
      +「こんにちは、世界」
      
      at node_modules/textlint-tester/src/textlint-tester.js:72:28

こちらのテストケースでは2つの指摘がなされますが、修正時の優先順位としては 句読点(。、)が閉じ括弧の直前に存在しています (句読点削除) > 連続した句読点(。、)が使われています (三点リーダーに修正) となるのが仕様上正しいのでしょうか?

massongit avatar Sep 13 '20 10:09 massongit

テストが正として修正のPRを出しました: https://github.com/io-monad/textlint-rule-general-novel-style-ja/pull/47

massongit avatar Sep 13 '20 10:09 massongit