View Single Post
Old 01-11-2016, 04:52 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,687
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
You could do the following:

1. Generate the TOC to have Sigil insert ids.

2. Select the Regular Expression mode and use the following regular expressions to copy ids to the paragraph tags (and to delete the headings):

Find:<h2 class="hide" id="(.*)">.*?</h2>\s*<p>
Replace:<p id="\1">

Once you've done that the link targets should also work in Book View mode. (At least it worked for the sample that you provided.)
Doitsu is offline   Reply With Quote