title chapter

This commit is contained in:
Julie Blanc 2026-04-09 19:37:52 +02:00
parent 5cb765701a
commit 9ed0fb0d1d
9 changed files with 302 additions and 126 deletions

View file

@ -54,7 +54,8 @@ export default class counters extends Handler {
case 'h1':
h1Count++;
h2Count = 0; // reset h2
el.setAttribute('data-counter', this.toUpperAlpha(h1Count));
const originalText = el.innerHTML;
el.innerHTML = `<span class="h1-count">${this.toUpperAlpha(h1Count)}</span><span class="h1-text">${originalText}</span>`;
break;
case 'h2':