On Tue, 4 Sep 2007 17:05:14 +0200, "Mario Rizzi" <[EMAIL PROTECTED]> said: > Hello. > > I have a long text with a lot of Html tags. I would like to change > all the quotes to smart quotes, but if I use the Text>Educate Quotes > command, BBEdit will educate all the quotes, even those which are > inside tags. Is there a way of getting BBEdit to skip the quotes in > tags?
Hi Mario I don't have the solution but I'm just chipping in with a few thoughts on this one because it interests me :) I'm just wondering if you want the "smart" quote HTML entities such as: “ for left double quote ” for right double quote ‘ for left single quote ’ for right sinlge quote If you replace the "stupid" quotes with these respectively they will appear as smart quotes in the browser window. The problem of course is that if you just do a find/replace over the file then all the quotes within the HTML tags become smart and this mucks everything up. I had this same desire some months ago and so I created an AppleScript which did it very clunkingly. That was when I first started using BBEdit which wasn't very long ago. My AppleScript just found the first instance of between this > and this < (i.e. not in HTML tags) then in that selection it changed all the quotes to smart quote HTML entities. Then it went on to the second instance of between this > and this < and did the changing of the quotes. It went on with that loop until it reached the end of the file. I have thrown that AppleScript away subsequently but I feel certain there must be a very much better way to do it and I am interested in the response from those much more knowledgeable about BBEdit. The program I used before I started using BBEdit, which was Nisus Writer classic, would perform this sort of operation with great ease and flair. It would find all instances of between > and < and then because it had non-contiguous selection it was possible to do a further "in selection" find/replace on the quotes so the whole thing could be done with two find/replace expressions in sequence. However there is a whole world of clever things within BBEdit which I have yet to explore such as "Text Factories" so maybe someone will describe a way to do this using that aspect of BBEdit. -- Patrick -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
