Skip to content

Commit

Permalink
Fix a diff substring text bug
Browse files Browse the repository at this point in the history
  • Loading branch information
QartemisT committed Dec 20, 2024
1 parent 32b5226 commit 4354477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,17 @@ const sanityText = (cacheData, text, overrideSpellID, spellMultiplier) => {
}
for (const diff of diffs.split("|")) {
if (difficulties[selectedDifficulty][diff.replaceAll(/diff/ig, "").trim()]) {
return matchT.substring(1, matchT.length - 2);
return matchT.substring(1, matchT.length - 1);
}
}
if (diffs2 !== undefined) {
for (const diff of diffs2.split("|")) {
if (difficulties[selectedDifficulty][diff.replaceAll(/diff/ig, "").trim()]) {
return matchT2.substring(1, matchT2.length - 2);
return matchT2.substring(1, matchT2.length - 1);
}
}
}
return matchF.substring(1, matchF.length - 2);
return matchF.substring(1, matchF.length - 1);
});
text = text.replaceAll(/\$(\d+)?[mMsSwW](\d+)?/g, (f, spellID, section) => { // SpellEffect variables
spellID = spellID || overrideSpellID || prevSpellID;
Expand Down

0 comments on commit 4354477

Please sign in to comment.