How to get rid of "junk styles"?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
keuler
Propeller Head
Posts: 63
Joined: Sun Sep 20, 2009 2:54 pm

How to get rid of "junk styles"?

Post by keuler »

Hi. After importing a project from RoboHelp, I'm finding via Analyser that I've brought in a lot of classes, esp span classes, like this:

Code: Select all

<span class="SomeDumbClass">Customers</span>
Is there an easy way to get rid of the entire span? I can replace '" class="SomeDumbClass' with nothing, but that still leaves the <span>...</span> text.

I should think some fancy regex could fix this, but is there an easy way from within Flare?

Thanks!
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: How to get rid of "junk styles"?

Post by kwag_myers »

I tested Flare 10 to see if the Find & Replace feature supported wild cards, and apparently it does not. My recommendation is to download Search & Replace Master, then replace <span class="*"> with <span>.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: How to get rid of "junk styles"?

Post by Nita Beck »

For this kind of code cleanup (and there's always a lot after a RoboHelp import), I use FAR HTML to create regular expressions that will remove the opening and closing span tags and leave the content. An advantage of FAR is that one can save find-and-replace routines to reuse as-is or reuse adapted for future cleanup.

WORD OF CAUTION: Whenever wanting to do code cleanup of this nature, BACK UP your project first, and also make interim backups as you proceed with the cleanup. It is VERY easy to hose the code of a project.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
keuler
Propeller Head
Posts: 63
Joined: Sun Sep 20, 2009 2:54 pm

Re: How to get rid of "junk styles"?

Post by keuler »

Good tips! Thanks all!
Post Reply