Calibre's editor has a good system for improving html/xhtml code and making it more readable. But sometimes there is a need for a more sophisticated and more configurable tool.
It seems to me that the ultimate tool for tidying up html/xhtml code is "
tidy".
Would it be difficult to create a plugin to use "tidy" in the calibre editor?
If not, is there any way to reorder the code of an epub with tidy?