From 614c35cf791e7c4e8c2730b255eedd6dc745d503 Mon Sep 17 00:00:00 2001 From: Yukky <67864326+Yoshino-Yukitaro@users.noreply.github.com> Date: Sun, 10 Mar 2024 13:52:58 +0900 Subject: [PATCH] fix: fix space after question rule's error message (#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 吉野敬太郎 --- packages/textlint-rule-ja-space-after-question/src/index.js | 2 +- .../textlint-rule-ja-space-after-question/test/index-test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/textlint-rule-ja-space-after-question/src/index.js b/packages/textlint-rule-ja-space-after-question/src/index.js index 0107d40..38454e0 100644 --- a/packages/textlint-rule-ja-space-after-question/src/index.js +++ b/packages/textlint-rule-ja-space-after-question/src/index.js @@ -21,7 +21,7 @@ function reporter(context) { const matchAfter = /?( )[^\n]/; matchCaptureGroupAll(text, matchAfter).forEach(match => { const {index} = match; - return report(node, new RuleError("文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", { + return report(node, new RuleError("文末に疑問符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", { index: index, fix: fixer.replaceTextRange([index, index + 1], " ") })); diff --git a/packages/textlint-rule-ja-space-after-question/test/index-test.js b/packages/textlint-rule-ja-space-after-question/test/index-test.js index b096c90..10b632f 100644 --- a/packages/textlint-rule-ja-space-after-question/test/index-test.js +++ b/packages/textlint-rule-ja-space-after-question/test/index-test.js @@ -25,7 +25,7 @@ tester.run("疑問符(?)", rule, { output: "驚きの速さ!? これが新製品のキャッチコピーでした? これは問題なし", errors: [ { - message: "文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", + message: "文末に疑問符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", column: 8 } ] @@ -35,7 +35,7 @@ tester.run("疑問符(?)", rule, { output: "どう操作したらよいのか? というユーザーの疑問に答えます。", errors: [ { - message: "文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", + message: "文末に疑問符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", line: 1, column: 13 }