Some checks failed
Deploy to OCI / deploy (push) Failing after 40s
buildWatermark() calls Array.join() on a lines array whose size is derived from tile dimensions divided by wmFontSize. For files with very many lines the codeFontSize (and thus wmFontSize) approaches zero, making charsPerLine and lineCount astronomically large and blowing past JS's string length limit. Fix by: 1. Clamping wmFontSize to a minimum of 1.0 to handle pathologically large files. 2. Capping charsPerLine at 400 and lineCount at 150 — the watermark is purely decorative so this cap has no visible impact.