diff --git a/src/replace-words.js b/src/replace-words.js index 0266934..ddb8b10 100644 --- a/src/replace-words.js +++ b/src/replace-words.js @@ -234,7 +234,7 @@ function verbMethod(node, regexp, options) { let match = node.nodeValue.match(regexp); if (match == null) { return; } const verb = match[1]; - const tense = match[2]; + const tense = match[2].toUpperCase().replaceAll(" ", "_"); const replace_value = verbsHelper.getConjugation(null, verb, tense, getPovIndex(options)); node.nodeValue = node.nodeValue.replace(regexp, replace_value); verbMethod(node, regexp, options); @@ -254,6 +254,7 @@ function pluralThirdVerbMethod(node, regexp, options) { verb = match[5]; tense = match[6]; } + tense = tense.toUpperCase().replaceAll(" ", "_"); const replace_verb = verbsHelper.getConjugation(null, verb, tense, 2); let replace_value; if (wasBefore) {