View Single Post
Old 09-20-2014, 02:52 PM   #29
JimmyG
Zealot
JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.JimmyG solves Fermat’s last theorem while doing the crossword.
 
Posts: 119
Karma: 28454
Join Date: Apr 2011
Location: Yuma, AZ
Device: Kindle Touch, Voyage
Quote:
Originally Posted by DiapDealer View Post
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.
Faced with a missing < or >, my program blithely smartens the quotes around attribute values. Of course, that situation would also screw up my syntax highlighting which would make the problem immediately apparent. Since my program is only for my use, it smartens on file load because I always use curly quotes. It also replaces quotes as I type. I have an equivalent for preview. All it does is show the file as it would look with the html and css in the file. If something is wrong, a missing < or >, it will be obvious.

I realize producing something for the world to use is a lot different from my producing something that only I use.

Sigil kinda reminds me of a grammar school teacher I had, whom we all loved so much. If you had a missing comma in your paper, she would take her red pencil and cross out the whole paragraph.
JimmyG is offline   Reply With Quote