add counters to toc level-1

This commit is contained in:
Julie Blanc 2026-04-22 10:47:47 +02:00
parent 5cd734966e
commit cd2a9e554d

View file

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