From ef6ad34a4eb3c6cccc3868fd9c1be320560fb28d Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidoS@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:32:15 -0500 Subject: [PATCH] [NAK_CVR_Mods] Fixed finding description for FuckToes --- .github/scripts/update-modlist.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/scripts/update-modlist.js b/.github/scripts/update-modlist.js index 7045224..b404561 100644 --- a/.github/scripts/update-modlist.js +++ b/.github/scripts/update-modlist.js @@ -29,10 +29,14 @@ function extractDescription(readmePath) { } } - // If we found a header, try to get the third line after it - if (headerIndex !== -1 && headerIndex + 2 < lines.length) { - const description = lines[headerIndex + 2].trim(); - return description || 'No description available'; + // If we found a header, look for the first non-empty line after it + if (headerIndex !== -1) { + for (let i = headerIndex + 1; i < lines.length; i++) { + const line = lines[i].trim(); + if (line && !line.startsWith('#')) { + return line; + } + } } return 'No description available';