From 53ecce1ecaaab77a65ed19f450eae6fe7c2f5113 Mon Sep 17 00:00:00 2001 From: jzitnik-dev Date: Sat, 7 Feb 2026 16:36:34 +0100 Subject: [PATCH] chore: Minor API changes --- scrape/parse/v3.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scrape/parse/v3.js b/scrape/parse/v3.js index 784cb37..3a6fab9 100644 --- a/scrape/parse/v3.js +++ b/scrape/parse/v3.js @@ -179,10 +179,15 @@ function parseLessonCell(cell) { if (!text || cleanupRegex.test(text) || !cell.fill?.fgColor) return null; + const backgroundColor = cell.fill.fgColor.argb === undefined ? undefined : `#${cell.fill.fgColor.argb}`; + const foregroundColor = backgroundColor === undefined ? undefined : ( + cell.font?.color?.argb === undefined ? undefined : `#${cell.font.color.argb}` + ); + return { text, - backgroundColor: cell.fill.fgColor.argb === undefined ? undefined : `#${cell.fill.fgColor.argb}`, - textColor: cell.font?.color?.argb === undefined ? undefined : `#${cell.font.color.argb}`, + backgroundColor, + foregroundColor, willBeSpecified: cell.fill.fgColor.argb === "FFFFFF00" ? true : undefined, }; } catch {