Since one usually uses the span to apply a style to only a piece of text getting rid of the opening empty tags should be fairly easy as you can do a find & replace in source. But that is only half of the solution if not less, because you need to get rid of the excessive closing tags as well. You could try and see if searching for "<span><span>" and replacing it with "<span>" works out, but it may replace the closing tags of two legitimately intertwined spans with just one. I still think it is worth a try. Make a backup of your entire project before you take out the big fork and start picking at it.
Tnx for the suggestion. I already do it with manual find/replace but with hundreds of topics this is very cumbersome, error-prone and time-consuming.
I would wish that Flare/analyzer is doing it or you have a script that can iterate over topics for such purposes.
I know, I know, the replace function works on several files. But still you have to do it manually! There is no automatic removal of empty opening and closing span tags.
I'm going to agree with chrisklein here, David. Sure you can search for <span> but, as you said, that only solves half your problems. If you search for <span> and replace it with nothing, then you're going to have a bunch of invalid topics that don't open because the XML isn't well-formed. If you search for </span></span> and replace it with </span>, then you are potentially going to remove legitimate versions of the double closing tag, and again end up with topics that won't open because they aren't well-formed.
The argument here isn't that Flare doesn't have find/replace or find in files. It clearly has that. But in this case, find/replace doesn't help because you can't batch find the files you're looking for with a normal search expression.
What you are going to want to do is to use a regular expression search. I'm not a reg-ex person; I think I've only tried once. But somebody who knows reg-ex will be able to create a simple regular expression that will match <span> any amount of text </span>. I think that will work for you. But you will want to back up your project before you do it to ensure you don't totally destroy the source files with a project-wide reg-ex replacement search, because that has the potential to get nasty very quickly.
I didn't claim anything else. As I mentioned in my earlier posts this is worth a try, I didn't claim that it the best way to do it. I also just noticed that I forgot to add the "/" for the closing span tags. It must be this:
You could try and see if searching for "</span></span>" and replacing it with "</span>" works out, but it may replace the closing tags of two legitimately intertwined spans with just one. I still think it is worth a try.
And further long the discussion was about if Flare can do a find and replace in source across all files in the project and it for sure can. Doc_guy, I am agreeing with what you point out and that is what I mentioned earlier, so I am a bit confused why you seem to claim that you disagree with me. RegEx may guide the search a bit more closely to the targets, but the time it takes to figure out which regex includes the desired cases and excludes the others the plain simple find&replace with manual confirmation is done. In any case your head will spin. Too bad it doesn't punish those who got the brilliant idea to use MS Word in the first place.
Your posts above seemed to me that you thought that chrisklein didn't understand Flare's find/replace capability. All I was saying was that chrisklein understands that Flare has find/replace but the standard find/replace won't do the search that chrisklein needs. You seemed to imply that it would. Yeah, you can do the search for the code that we both talked about, but that isn't automated. Any automated solution here is going to require some reg ex, in my opinion.