
You were relying on Tidy to clean up after you deliberately made mess (if you insist on continuing this insanity, change your clean source preferences to use Tidy HTML)
IMHO a tiny bit more REGEX and you could have rebuilt with the proper H2 closing tag
Code:
<p class="calibre2">Chapter (.+?)</p>
Code:
<h2 class="chhead">Chapter \1</h2>
Lots cleaner (code save reliability wise)