Extraneous Code?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
pcalnan
Propeller Head
Posts: 65
Joined: Tue Jul 17, 2007 8:30 am
Location: Ottawa, Ontario
Contact:

Extraneous Code?

Post by pcalnan »

I removed conditioning from a bulleted list and noticed the following in the HTML code:

Code: Select all

<li MadCap:conditions=\"\">
Is it me or is that unnecessary?
Patrick Calnan
Shopify
http://www.shopify.com
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Post by doc_guy »

This happens to your source (and your WebHelp output) files when you add a condition to an element, then remove it.

What happened was that at some point, you (or another author) applied a condition to this <li> element, and then later you came back and removed the condition. When this happens, the condition value is removed, but the attribute is left behind.

I wouldn't worry too much about it. If it bothers you, you can always do a global find/replace for

Code: Select all

MadCap:conditions=\"
and replace it with nothing.
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Post by doc_guy »

Upon careful reading of your original post, you know how/why this happened. Sorry. This didn't have my full attention.

Yes. It is extraneous; the attribute is left behind. If it bothers you, you can do the find/replace I mentioned. I don't think it is a too big of a deal however; it doesn't affect the output in any way, and it only occurs if you add then remove a condition setting.
Paul Pehrson
My Blog

Image
pcalnan
Propeller Head
Posts: 65
Joined: Tue Jul 17, 2007 8:30 am
Location: Ottawa, Ontario
Contact:

Re: Extraneous Code

Post by pcalnan »

Thanks for the response, Paul.

I realized that it wasn't harmful code but it did strike me as somewhat wasteful. While it may only be a few characters that don't end up causing any problems, one of the selling points of Flare over RoboHELP was that it was much \"cleaner\" in the way that it handled and generated HTML code.

I know I'm being really nitpicky about this but I'd also argue that leaving \"code artifacts\" like this lying around post-generation is something that could stand \"tidying up\".

Just my NSHO.
Patrick Calnan
Shopify
http://www.shopify.com
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Post by doc_guy »

Fair enough.

And actually, I think you're right on this one. I suggest you submit a bug report/feature request.
Paul Pehrson
My Blog

Image
ChristineShirey
Propeller Head
Posts: 14
Joined: Tue Oct 23, 2007 9:07 am
Location: Boston, MA

Re: Extraneous Code?

Post by ChristineShirey »

I'm searching the forum for information on how to remove a condition from a piece of text (say, three words), and your post tells me you might know something I haven't been able to figure out. Did this result from removing the condition manually (as opposed to removing it in batch using Analyzer)?

[quote="pcalnan"]I removed conditioning from a bulleted list and noticed the following in the HTML code:

Code: Select all

<li MadCap:conditions=\"\">
If yes, could you or somebody else chime in about what you did to remove the condition? (I'll worry about the extraneous code later.)

I can't find anything in Flare's or Analyzer's Help about removing a condition from a specific occurrence, so I've resorted to opening the topic in a text editor and removing the tags. <moan>

Thanks!
Christine
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Extraneous Code?

Post by LTinker68 »

It depends on what you applied the condition to. (BTW, if you don't have show blocks, show spans, and show conditional indicators enabled, then you should do that now.)

If you selected some text in a paragraph, list, etc., then the conditional tag will show up at the top of the XML Editor. Right-click on that conditional indicator, select Conditions, then uncheck the condition(s) you don't want associated with that text.

If you applied the conditional tag to an entire tag block (<p>, <ol>, <h2>, etc.), then right-click on that block on the left side of the XML Editor (it'll be the color that matches the conditional tag), select Conditions, and uncheck the conditions you don't want.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply