From be9c323202027b43fb2f074f540aecc566f118b4 Mon Sep 17 00:00:00 2001 From: azu Date: Sat, 19 Mar 2016 17:17:43 +0900 Subject: [PATCH] refactor(rule): use { index } instead of location --- src/textlint-rule-rousseau.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/textlint-rule-rousseau.js b/src/textlint-rule-rousseau.js index 6d3c205..6a42fe5 100644 --- a/src/textlint-rule-rousseau.js +++ b/src/textlint-rule-rousseau.js @@ -69,11 +69,10 @@ export default function textlintRousseau(context, options = defaultOptions) { if (!isShowType(type)) { return; } - const paddingPosition = source.originalPositionFromIndex(result.index); + const index = source.originalIndexFromIndex(result.index); const suggestions = createSuggest(result.replacements); const ruleError = new RuleError(`${level}(${type}) ${result.message}${suggestions}`, { - line: paddingPosition.line - 1, - column: paddingPosition.column + index }); report(node, ruleError); };