Quote:
Originally Posted by JimmyG
I tried to use your plugin on a file, and it refused to do it refused to do it because the file had an error or was not well-formed, I forget the actual wording. Found the error, fixed it, and then no problem. That's all I know.
|
The underlying SmartyPants algorithm needs to tokenize the html so that it can isolate the text of the document (otherwise it would be "smartening" the quotes around the tags various attributes). Of
course it will barf it is fed garbage. The only other possible thing it could do is try to
fix that garbage (which I have no desire to do, and you've clearly indicated you don't want programs doing).
I understand not wanting to have your code altered without your permission--I really do. But I don't quite understand what you expect an
automated markup-manipulation tool (which
relies on well-formed markup to be able to function properly) to do when it encounters problems with your markup? It has exactly two choices: barf, or try to fix the problem.
Even calibre does this. If you want to Beautify or Smarten or Fix your html, it will make the changes it deems necessary. And the use of any of those automated tools requires ancillary changes to the markup that are a bit unrelated to what the Tool is trying to do. For instance, the built-in calibre Smartener requires that you have to sacrifice any HTML entities. I don't say this to condemn calibre--but just to point out the similarities. Calibre's checkpoint system and visual compare make it easy to revert any undesired changes, and I love that. I use it a
lot. But I also know that I can close Sigil without saving if I suspect anything weird might have happened. I do that a lot, too.
My long, and rather drawn out, point is this: the time to use any automated markup-manipulation tools is AFTER you've determined you have clean markup.