View Single Post
Old 02-23-2023, 01:00 PM   #3
hihohahi
Junior Member
hihohahi began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2023
Device: none
Quote:
Originally Posted by DNSB View Post
For the most part when I see chapter headers using p tags, I would create a hidden header item using regex and then create the ToC from the header tags.

source: <p class="chapter">(.*?)</p> <p class="ChapterName">(.*?)</p>

dest: <h3 class="hidden" title="\1: \2">\1: \2</h3> <p class="chapter">\1</p> <p class="ChapterName">\2</p>

<h3 class="hidden" title="Chapter 1: ABCDEF">Chapter 1: ABCDEF</h3>
<p class="Chapter">Chapter 1 </p>
<p class="ChapterName">ABCDEF</p>
Thank you! this works!
hihohahi is offline   Reply With Quote