Skip to content

Commit

Permalink
fix minimessage format for rgb page
Browse files Browse the repository at this point in the history
  • Loading branch information
bwmp committed Oct 19, 2024
1 parent 76920f4 commit 3fdeaa3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/util/RGBUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export function generateOutput(
if (lowerRange === upperRange) continue;
output += `<gradient:${currentColor.hex}:${nextColor.hex}>${text.substring(lowerRange, upperRange)}</gradient>`;
}
console.log(output, '181');
}

if (format.color != 'MiniMessage') {
Expand Down Expand Up @@ -222,12 +223,11 @@ export function generateOutput(
hexOutput = hexOutput.replace('$c', segment[0]);
output += hexOutput;
}

if (format.bold && bold) output = format.bold.replace('$t', output);
if (format.italic && italic) output = format.italic.replace('$t', output);
if (format.underline && underline) output = format.underline.replace('$t', output);
if (format.strikethrough && strikethrough) output = format.strikethrough.replace('$t', output);
if (prefixsuffix) output = prefixsuffix.replace(/\$t/g, output);
return output;
}
if (format.bold && bold) output = format.bold.replace('$t', output);
if (format.italic && italic) output = format.italic.replace('$t', output);
if (format.underline && underline) output = format.underline.replace('$t', output);
if (format.strikethrough && strikethrough) output = format.strikethrough.replace('$t', output);
if (prefixsuffix) output = prefixsuffix.replace(/\$t/g, output);
return output;
}

0 comments on commit 3fdeaa3

Please sign in to comment.