Skip to content

Commit c54deea

Browse files
committed
refactor(npm): use match-index as a module
1 parent b5fc666 commit c54deea

23 files changed

+22
-105
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
},
4646
"dependencies": {
4747
"analyze-desumasu-dearu": "^2.1.2",
48+
"match-index": "^1.0.1",
4849
"moji": "^0.5.1",
4950
"regexp.prototype.flags": "^1.1.1",
5051
"regx": "^1.0.4",

src/1.2.1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"use strict";
33
import regx from 'regx';
44
import {japaneseRegExp} from "./util/regexp";
5-
import {matchCaptureGroupAll} from "./util/match-index";
5+
import {matchCaptureGroupAll} from "match-index";
66
import mergeMatches from "./util/merge-matches";
77
const rx = regx("g");
88
/*

src/2.1.10.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
ただし桁区切りの「カンマ」は省略する場合があります。
77
*/
88
import {isUserWrittenNode} from "./util/node-util";
9-
import {matchCaptureGroupAll} from "./util/match-index";
9+
import {matchCaptureGroupAll} from "match-index";
1010
function reporter(context) {
1111
let {Syntax, RuleError, report, fixer, getSource} = context;
1212
return {

src/2.1.5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {isUserWrittenNode} from "./util/node-util";
1313
import {hanKarakanaRegExp} from "./util/regexp";
1414
import prh from "textlint-rule-prh";
1515
import path from "path";
16-
import {matchCaptureGroupAll} from "./util/match-index";
16+
import {matchCaptureGroupAll} from "match-index";
1717
import moji from "moji";
1818
/**
1919
* 半角カタカナを全角カタカナに変換

src/2.1.8.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
import {isUserWrittenNode} from "./util/node-util";
1010
import moji from "moji";
11-
import {matchCaptureGroupAll} from "./util/match-index";
11+
import {matchCaptureGroupAll} from "match-index";
1212
function toHankaku(string) {
1313
return moji(string).convert('ZE', 'HE').toString();
1414
}

src/2.1.9.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ただし、表記をできるだけ統一するため、特別な理由がない限り半角での表記を原則とします。
88
*/
99
import {isUserWrittenNode} from "./util/node-util";
10-
import {matchCaptureGroupAll} from "./util/match-index";
10+
import {matchCaptureGroupAll} from "match-index";
1111
import moji from "moji";
1212
function toHankaku(string) {
1313
return moji(string).convert('ZE', 'HE').toString();

src/3.1.1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
。ただしカタカナ複合語の場合を除きます。「2.1.7 カタカナ複合語」を参照してください。
88
*/
99
import {isUserWrittenNode} from "./util/node-util";
10-
import {matchCaptureGroupAll} from "./util/match-index";
10+
import {matchCaptureGroupAll} from "match-index";
1111
function reporter(context) {
1212
let {Syntax, RuleError, report, fixer, getSource} = context;
1313
return {

src/3.1.2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// LICENSE : MIT
22
"use strict";
33
import {isUserWrittenNode} from "./util/node-util";
4-
import {matchAll} from "./util/match-index";
4+
import {matchAll} from "match-index";
55
import regx from 'regx';
66
import {japaneseRegExp} from "./util/regexp";
77
const rx = regx("g");

src/3.2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
「2.1.7 カタカナ複合語」を参照してください。
77
*/
88
import {isUserWrittenNode} from "./util/node-util";
9-
import {matchCaptureGroupAll} from "./util/match-index";
9+
import {matchCaptureGroupAll} from "match-index";
1010

1111
export default function (context) {
1212
let {Syntax, RuleError, report, getSource} = context;

src/3.3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
かっこの外側、内側ともにスペースを入れません。
66
*/
77
import {isUserWrittenNode} from "./util/node-util";
8-
import {matchCaptureGroupAll} from "./util/match-index";
8+
import {matchCaptureGroupAll} from "match-index";
99

1010
const brackets = [
1111
"\\[", "\\]", "(", ")", "[", "]", "「", "」", "『", "』"

0 commit comments

Comments
 (0)