The xpath expression is the one that came with Calibre. I don't even begin to understand it:
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']
But if this needs to be changed, then why does a heading without space (e.g. chapter1) work?
p.s. - I tried replacing class = 'chapter' with class = 'himg1'. Didn't work.