From 544c4227f75b01f925d3df8ef1422af763a500fd Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 23 Jun 2026 13:12:57 +0900 Subject: [PATCH] chore(dev): refactor --- .github/scripts/frontend-js-size.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/frontend-js-size.mjs b/.github/scripts/frontend-js-size.mjs index e43266daea..eaf6f414bc 100644 --- a/.github/scripts/frontend-js-size.mjs +++ b/.github/scripts/frontend-js-size.mjs @@ -49,7 +49,7 @@ function formatMathText(text) { .replaceAll('\\', '\\\\') .replaceAll('{', '\\{') .replaceAll('}', '\\}') - .replaceAll('%', '\\\\%'); + .replaceAll('%', '\\%'); } function formatDiff(diff) { @@ -58,7 +58,7 @@ function formatDiff(diff) { const sign = diff > 0 ? '+' : '-'; const text = `${sign}${formatBytes(Math.abs(diff))}`; const color = diff > 0 ? 'orange' : 'green'; - return `$\\color{${color}}{\\text{${formatMathText(text)}}}$`; + return `$\\color{${color}}{\\text{${formatMathText(text).replaceAll('\\%', '\\\\%')}}}$`; } function formatDiffPercent(beforeSize, afterSize) { @@ -67,7 +67,7 @@ function formatDiffPercent(beforeSize, afterSize) { if (diff === 0) return `0%`; const percent = Math.round(diff / beforeSize * 100); const color = diff > 0 ? 'orange' : 'green'; - return `$\\color{${color}}{\\text{${formatMathText(percent.toString() + '%')}}}$`; + return `$\\color{${color}}{\\text{${formatMathText(percent.toString() + '%').replaceAll('\\%', '\\\\%')}}}$`; } function escapeCell(value) {