Quote:
Originally Posted by Hamlet53
One thing I've noticed about the use of TIDY; it often 'corrects' code in a way I don't want. My HTML editor of choice is HTML Kit and this includes TIDY as a plugin. However, it produces a side-by-side comparison of original code and corrected with changes highlighted.
|
When it works, Tidy usually doesn't mess up your code too much. It is also used internally in Sigil to keep the HTML source of the book in an XML format; this makes it much easier (and faster) to manipulate the source. You can just use an XML tool.
In 0.2.0, a lot of the performance gains have come from removing the regex manipulations and using an XML tool (like QDom). This along with the multi-threading work make opening and closing the TOC editor
instantaneous in 0.2.0. It was very slow in 0.1.x. This could not have been achieved without something to keep the source as XML.
And since the user can always edit the source in the Code View, there has to some automated tool to correct any mistakes the user may have made that change the XML validity of the document. Sadly, the only error-correcting parser that can handle really ugly HTML
and is in C or C++ is HTML Tidy.
So both of us will just have to live with it.