RE: Does Tidy support consolidating multiple consecutive tags?

"Michael J. Lyons" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
Awesome, thanks!!

-----Original Message-----
From: Eric Frost [mailto:[email protected]] 
Sent: Monday, February 23, 2009 7:42 AM
To: Michael J. Lyons; [email protected]
Subject: Re: Does Tidy support consolidating multiple consecutive tags?

Hi Michael,

You can merge spans and divs and it will consolidate attribute:
http://tidy.sourceforge.net/docs/quickref.html#merge-spans
http://tidy.sourceforge.net/docs/quickref.html#merge-divs
You can also sort the combined attributes:
http://tidy.sourceforge.net/docs/quickref.html#sort-attributes
I cannot think of any side effects..

The option to merge spans is one of the more recent additions
to html tidy.
http://tidy.sourceforge.net/
I don't know about any other tags that can be merged, such as
duplicate consecutive b or h1 tags... I don't think so. Where
this is most often an issue is with span's and div's.

hope this helps,
Eric
__
http://www.imsa1990.com
http://www.directionscommunity.com


From: Michael J. Lyons
Sent: Sunday, February 22, 2009 5:44 PM
To: [email protected]
Subject: Does Tidy support consolidating multiple consecutive tags?


If I have multiple tags, such as "span", with different (non-duplicate) 
attributes, such as:

<span style="my_style"><span font="some_font"><span 
color="some_color">text</span></span></span>

Can "Tidy" consolidate these into one (as below)? Would there be any
side 
effect of doing this?

<span style="my_style" font="some_font" color="some_color">text</span>

Also, what about multiple tags like "span" with the same attribute?
I.e., 
this:

<span attr="my_attr"><span attr="my_attr">text</span></span>

Becomes this:

<span attr="my_attr">text</span>

?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.