Failed to execute 'querySelectorAll' on 'Element' when trying to display a table of contents
Hi!
I am trying to create a table of contents but pagedjs throws an error when trying to render it.
The error is the following:
Uncaught (in promise) DOMException: Failed to execute 'querySelectorAll' on 'Element': '.toc-link:after:not([data-target-counter-62e106db-de56-4589-9e11-28d7d9c4df1a])' is not a valid selector.
at https://unpkg.com/pagedjs/dist/paged.polyfill.js:29941:37
the error disappears if I comment this line like this:
.toc-link::after {
/* content: target-counter(attr(href), page); */
float: right;
position: absolute;
right: 0;
background-color: white;
padding-left: 6px;
text-decoration: none;
}
I tried to look for this problem in the issues but I could not find anything relevant.
Have you seen this issue before, could you advise on what I am doing wrong?
Best,