[TxMt] Re: Convert inline CSS to stylesheet

Steve King sking at arbor.net
Tue May 25 14:54:49 UTC 2010


On 2010-05-21 08:59, David Miers wrote:
> I just tried it [the HTML bundle's Tidy command]....no love!
>    

Tidy has about a bazillion options, all available both on the command 
line and in a config file.  I think the option you're looking for is 
"clean":

# clean
# Type: Boolean
# Default: no
# Example: y/n, yes/no, t/f, true/false, 1/0
#
# This option specifies if Tidy should strip out surplus presentational tags
# and attributes replacing them by style rules and structural markup as
# appropriate. It works well on the HTML saved by Microsoft Office products.

In any case, I don't think that the "Tidy" command in the HTML bundle 
has this option enabled by default.  You could either edit the command 
to add "--clean yes" to the command line, or create ~/.tidyrc and add 
"clean: yes" there.  It's worthwhile to look at the tidy man page; it 
has a *lot* of formatting options.

-- 
Steve King
Sr. Software Engineer
Arbor Networks
+1 734 821 1461
www.arbornetworks.com <http://www.arbornetworks.com/>




More information about the textmate mailing list