It seems that the idea of a ".garbage" file type would still work. If sigil WON'T save invalid code with an .epub extension and it ONLY saves it as .garbage then there is no way you would get confused when saving. :edit: Just avoid the auto-cleanup if you use ctl-alt-s (or something) and save as a .garbage
The change that is required is on opening:
On opening, check to see if it is a valid epub BEFORE tidy/pretty can have a go at it.
- if it is an .epub file, show a warning box that it is invalid and give the user the OPTION to continue with cleanup or not
- if it is a .garbage file, then show the warning but no need for an option, just open without cleanup
I think that would allow people to save garbage if they absolutely had to, would prevent data loss when opening a badly formed .epub for the first time, and would let us keep the auto cleaning function enabled for normal workflow.
:edit: Doesn't Sigil already do something like this when adding external files?
Last edited by Turtle91; 02-20-2013 at 11:35 AM.
|