Merge pull request #6 from TauNeutrino/perf-optimize-tags-7950496920454073492

 Optimize tag badge generation with for...of
This commit is contained in:
Michael
2026-03-10 13:52:12 +01:00
committed by GitHub
2 changed files with 56 additions and 1 deletions

View File

@@ -358,7 +358,10 @@ export function createDayCard(day) {
let tagsHtml = '';
if (matchedTags.length > 0) {
const badges = matchedTags.map(t => `<span class="tag-badge-small"><span class="material-icons-round" style="font-size:10px;margin-right:2px">star</span>${escapeHtml(t)}</span>`).join('');
let badges = '';
for (const t of matchedTags) {
badges += `<span class="tag-badge-small"><span class="material-icons-round" style="font-size:10px;margin-right:2px">star</span>${escapeHtml(t)}</span>`;
}
tagsHtml = `<div class="matched-tags">${badges}</div>`;
}