I am looking to make a clipboard filter that switches single for double quotes and double for single quotes, wraps the whole clipboard in double quotes, and then makes them all smart quotes. In an ideal world, this would preserve rich-text formatting.
I've tried replacing double quotes with @@@ and single quotes with @@, and then replacing those with single and double quotes respectively, but this clutters up the history list when I run the filter on a previous item in the list. (If I were always running it on the current clipboard, I could just delete past clipboards when done.) Plus, for some reason, I can't get the smart quote filter to work on the final result.
Any help would be appreciated!