Skip to content

Commit

Permalink
Another $?diff variant rule
Browse files Browse the repository at this point in the history
  • Loading branch information
QartemisT committed Jan 2, 2025
1 parent 945aeb3 commit c9b2370
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ const sanityText = (cacheData, text, overrideSpellID, spellMultiplier) => {
text = text.replaceAll(/\$?@?spellaura(\d+)/ig, (_, spellID) => // SpellAura variable
sanityText(cacheData, cacheData.spell[spellID]?.AuraDescription_lang, spellID, spellMultiplier)
);
text = text.replaceAll(/\$\?((?:(?:\$\?)?diff[\d|]+?)+)(?:[\s\n\r]+)?(\[[^\]]+]|\[])(?:[\s\n\r]+)?(\?((?:diff[\d|]+?)+)(?:[\s\n\r]+)?(\[[^\]]+]|\[]))?(\[[^\]]+]|\[])/ig, (_1, diffs, matchT, _2, diffs2, matchT2, matchF) => {
text = text.replaceAll(/\$\?((?:(?:\$\?)?diff[\d|]+?)+)(?:[\s\n\r]+)?(\[[^\]]+]|\[])(?:[\s\n\r]+)?(\?((?:diff[\d|]+?)+)(?:[\s\n\r]+)?(\[[^\]]+]|\[]))?(\[[^\]]+]|\[])?/ig, (_1, diffs, matchT, _2, diffs2, matchT2, matchF) => {
if (! matchF) {
matchF = "[]";
}
if (selectedDifficulty === "all") {
let diffz = "";
for (const diff of diffs.split("|")) {
Expand Down

0 comments on commit c9b2370

Please sign in to comment.