From 5de1a91f02a81a1f28119b342fb58b01eae78020 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Sun, 26 Oct 2025 21:06:59 -0700 Subject: [PATCH] ci: fix "size report" (bundle size) markdown table comment formatting (#6318) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixes https://github.com/Comfy-Org/ComfyUI_frontend/issues/6136 by adding empty lines between html and markdown in the bundle size report comments. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6318-ci-fix-size-report-bundle-size-markdown-table-comment-formatting-2996d73d36508104872be56c238339a8) by [Unito](https://www.unito.io) --- scripts/size-report.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/size-report.js b/scripts/size-report.js index e92d53ee3..b6d2a0d6a 100644 --- a/scripts/size-report.js +++ b/scripts/size-report.js @@ -314,6 +314,11 @@ function renderCategoryDetails(report) { for (const category of report.categories) { lines.push(renderCategoryBlock(category, report.hasBaseline)) + lines.push('') + } + + if (report.categories.length > 0) { + lines.pop() } lines.push('') @@ -339,9 +344,11 @@ function renderCategoryBlock(category, hasBaseline) { summaryParts.push('') lines.push(summaryParts.join('')) + lines.push('') if (category.description) { lines.push(`_${category.description}_`) + lines.push('') } if (category.bundles.length === 0) { @@ -382,6 +389,7 @@ function renderCategoryBlock(category, hasBaseline) { }) lines.push(markdownTable([headers, ...rows])) + lines.push('') const statusParts = [] if (category.counts.added) statusParts.push(`${category.counts.added} added`) @@ -393,10 +401,11 @@ function renderCategoryBlock(category, hasBaseline) { statusParts.push(`${category.counts.decreased} shrank`) if (statusParts.length > 0) { - lines.push(`\n_Status:_ ${statusParts.join(' / ')}`) + lines.push(`_Status:_ ${statusParts.join(' / ')}`) + lines.push('') } - lines.push('\n') + lines.push('') return lines.join('\n') }