Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textlint-rule-ja-space-after-exclamation

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-rule-ja-space-after-exclamation - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

4

package.json
{
"name": "textlint-rule-ja-space-after-exclamation",
"version": "2.4.1",
"version": "2.4.2",
"description": "感嘆符前後のスペースについてのtexlintルール",

@@ -38,3 +38,3 @@ "main": "lib/index.js",

},
"gitHead": "3dd855f120d272d06419273766ab57ecc04264c5"
"gitHead": "9d642c1d8c9b812d4bb5778e19eeb16e1faefc22"
}

@@ -8,9 +8,9 @@ // LICENSE : MIT

*/
import {RuleHelper} from "textlint-rule-helper";
import {matchCaptureGroupAll} from "match-index";
import { RuleHelper } from "textlint-rule-helper";
import { matchCaptureGroupAll } from "match-index";
function reporter(context) {
const {Syntax, RuleError, report, fixer, getSource} = context;
const { Syntax, RuleError, report, fixer, getSource } = context;
const helper = new RuleHelper();
return {
[Syntax.Str](node){
[Syntax.Str](node) {
if (!helper.isPlainStrNode(node)) {

@@ -23,8 +23,11 @@ return;

const matchAfter = /!( )[^\n]/;
matchCaptureGroupAll(text, matchAfter).forEach(match => {
const {index} = match;
return report(node, new RuleError("文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
index: index,
fix: fixer.replaceTextRange([index, index + 1], " ")
}));
matchCaptureGroupAll(text, matchAfter).forEach((match) => {
const { index } = match;
return report(
node,
new RuleError("文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
index: index,
fix: fixer.replaceTextRange([index, index + 1], " ")
})
);
});

@@ -31,0 +34,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc