TOC Duplicating issue
here is the toc code
and this is my toc UI
what issue i am facing that write only 1 border line it is duplicating
also the header where Table of content heading is defined is doubled i just overlap them
but what should i do show only 1 border line i just implement 1
In general, you typically render TOC twice. The first time so it consumes the appropriate place and render headings and styles. The second time you render it again, but this time just with page numbers and merge it into the main template. Like here
This means that the dots should be hidden by you the second time and invisible.
Anyway, please share MINIMAL playground demo so we can take a look.