Compare commits

..

1 Commits

Author SHA1 Message Date
Fam Zheng
47aade71cf fix: resolve heredoc parsing error in deploy-oci Makefile target
Extract inline Dockerfile to Dockerfile.oci and scp it instead of
generating it via heredoc over SSH. Make's line-continuation backslash
was causing the heredoc delimiter to be parsed as 'DEOFnFROM' by the
remote shell, breaking the image build step.
2026-04-07 10:54:22 +01:00

View File

@ -302,12 +302,11 @@ export class RepoRenderer {
// Watermark — tiled path text, 45° rotated, slightly larger than code font
if (!tile.watermark) {
const codeFontSize = (d.h / d.lines) * 0.65;
// Clamp wmFontSize to avoid degenerate tiny values on files with huge line counts
const wmFontSize = Math.max(codeFontSize * 2.5, 1.0);
const wmFontSize = codeFontSize * 2.5;
const wmLabel = `${this.repoName}/${d.path}`;
// Estimate how many repetitions to fill the area; cap to prevent RangeError on massive tiles
const charsPerLine = Math.min(Math.ceil(Math.max(d.w, d.h) * 1.5 / (wmFontSize * 0.5)), 400);
const lineCount = Math.min(Math.ceil(Math.max(d.w, d.h) * 1.5 / (wmFontSize * 1.5)), 150);
// Estimate how many repetitions to fill the area
const charsPerLine = Math.ceil(Math.max(d.w, d.h) * 1.5 / (wmFontSize * 0.5));
const lineCount = Math.ceil(Math.max(d.w, d.h) * 1.5 / (wmFontSize * 1.5));
const wmContent = buildWatermark(wmLabel, charsPerLine, lineCount);
const wm = new Text();