From 7056fa7c07ae08f5596c9ef8d8582642890bd764 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 10 May 2022 20:39:43 -0300 Subject: rename strings arg to language --- src/util/replacer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/replacer.js b/src/util/replacer.js index 0066d218..b29044f2 100644 --- a/src/util/replacer.js +++ b/src/util/replacer.js @@ -319,7 +319,7 @@ export function parseInput(input) { } function evaluateTag(node, opts) { - const { find, input, link, replacerSpec, strings, to, wikiData } = opts; + const { find, input, language, link, replacerSpec, to, wikiData } = opts; const source = input.slice(node.i, node.iEnd); @@ -382,7 +382,7 @@ function evaluateTag(node, opts) { : link[linkKey]); try { - return fn(value, {text: label, hash, args, strings, to}); + return fn(value, {text: label, hash, args, language, to}); } catch (error) { logError`The link ${source} failed to be processed: ${error}`; return source; @@ -416,14 +416,14 @@ function transformNodes(nodes, opts) { return nodes.map(node => transformNode(node, opts)).join(''); } -export function transformInline(input, {replacerSpec, find, link, strings, to, wikiData}) { +export function transformInline(input, {replacerSpec, find, link, language, to, wikiData}) { if (!replacerSpec) throw new Error('Expected replacerSpec'); if (!find) throw new Error('Expected find'); if (!link) throw new Error('Expected link'); - if (!strings) throw new Error('Expected strings'); + if (!language) throw new Error('Expected language'); if (!to) throw new Error('Expected to'); if (!wikiData) throw new Error('Expected wikiData'); const nodes = parseInput(input); - return transformNodes(nodes, {input, find, link, replacerSpec, strings, to, wikiData}); + return transformNodes(nodes, {input, find, link, replacerSpec, language, to, wikiData}); } -- cgit 1.3.0-6-gf8a5