From b76430caaf8ae22e99e7c8bad79f3f53c9a989a9 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 7 Jun 2026 21:11:24 -0400 Subject: [PATCH] Bold # header lines Lines starting with # render bold and a touch brighter (a title, not just a dim note); ( and [ annotation lines stay dim. Export matches. Co-Authored-By: Claude Opus 4.8 (1M context) --- static/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/index.html b/static/index.html index 4829dd9..0a1a274 100644 --- a/static/index.html +++ b/static/index.html @@ -115,6 +115,7 @@ z-index: 1; } #highlight .anno { color: #6a5f52; } + #highlight .hdr { color: #8a7d6c; font-weight: 700; } #gutter { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; } #gutter .bracket { position: absolute; left: 7px; width: 7px; @@ -642,7 +643,7 @@ function render(){ h += `${text}`; } } - const lcls = 'lmark' + (/^\s*[#([]/.test(line) ? ' anno' : ''); + const lcls = 'lmark' + (/^\s*#/.test(line) ? ' hdr' : /^\s*[([]/.test(line) ? ' anno' : ''); html += (line ? `${h}` : '') + '\n'; }); highlight.innerHTML = html; @@ -1047,8 +1048,11 @@ document.getElementById('exportBtn').addEventListener('click', async ()=>{ x.globalAlpha = 1; }); } - x.fillStyle = /^\s*[#([]/.test(line) ? '#6a5f52' : ink; + const isHdr = /^\s*#/.test(line); + x.font = isHdr ? '700 ' + font : font; + x.fillStyle = isHdr ? '#8a7d6c' : /^\s*[([]/.test(line) ? '#6a5f52' : ink; x.fillText(line, PAD, y); + x.font = font; if(rhythm && fresh){ const spans = (analysis.stress.filter(s=>s.l===i)).sort((a,b)=>a.s-b.s); x.font = "8px 'Spline Sans Mono', monospace";