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.
Description
Repository visualization tool - interactive visualization of git repository structures and activity
Languages
JavaScript
48.8%
Rust
30.5%
HTML
16.5%
Makefile
3.4%
Dockerfile
0.8%