@Doitsu...Yes, I agree with you on all counts. You really shouldn't use regex in code, couldn't agree more. But this is not a standard fault that can be spotted or cured easily -- so I thought that I would just try the regex and see if it would work(it didn't work). Remember, there are alot of other image tags in GG's LHS.xhtml file that are also formatted with divs around image tags in the same way. So, if it was my code(and I'm not saying its not), then why are all those other image tags dual formatted correctly in GG's epub after running the plugin? And why can't I reproduce this fault in any other ebook using image tags within div tags? That's what makes this problem so weird and strange.
I've also had strange wrap problems like this before in the past where it wasn't the code but was caused by wrap errors. And I really don't want to use Tidy again to cure this, not keen on that either because that's overkill. The wrapping thing is a wild guess by the way. But the only way way I can prove that that problem is caused by wrapping problems is by using the Tidy module and setting the wrap option to OFF to see if that cures the problem. I might do that later(bit busy now). But I'll let you know the outcome of this testing with Tidy when I can.
Last edited by slowsmile; 08-22-2017 at 08:23 AM.
|