Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Dec 26, 2023
1 parent a46a29f commit 854b7ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ export class Translator {

/**
* @param {string} searchResolution
* @param {number} i
* @param {number} currentLength
* @param {string} source
* @returns {number}
*/
_getNextSubstringLength(searchResolution, i, source) {
_getNextSubstringLength(searchResolution, currentLength, source) {
if (searchResolution === 'word') {
return source.search(/[^\p{Letter}]([\p{Letter}\p{Number}]*)$/u);
return source.search(/[^\p{Letter}][\p{Letter}\p{Number}]*$/u);
} else {
return i - 1;
return currentLength - 1;
}
}

Expand Down

0 comments on commit 854b7ab

Please sign in to comment.