Skip to content

Commit ae5a675

Browse files
authored
Merge pull request #17 from textlint-ja/fix-sentenceIndex
refactor: `sentenceIndex` should be number
2 parents 6eac84a + 29b24d5 commit ae5a675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/no-doubled-conjunctive-particle-ga.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export default function (context, options = {}) {
5454
return;
5555
}
5656
const current = conjunctiveParticleGaTokens[0];
57-
const sentenceIndex = source.originalIndexFromPosition(sentence.loc.start);
58-
const currentIndex = (sentenceIndex || 0) + (current.word_position - 1);
57+
const sentenceIndex = source.originalIndexFromPosition(sentence.loc.start) || 0;
58+
const currentIndex = sentenceIndex + (current.word_position - 1);
5959
report(node, new RuleError(`文中に逆接の接続助詞 "が" が二回以上使われています。`, {
6060
index: currentIndex
6161
}));

0 commit comments

Comments
 (0)