add counters to toc level-1
This commit is contained in:
parent
5cd734966e
commit
cd2a9e554d
1 changed files with 1 additions and 0 deletions
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue