Tidy: Difference between revisions

fixes option syntax
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
Tags: Mobile edit Mobile web edit
 
Line 9: Line 9:


In a team environment, you can publish/share a common tidy.rc so that everyone is using the same configuration.  This combination of command-line options is pretty good:
In a team environment, you can publish/share a common tidy.rc so that everyone is using the same configuration.  This combination of command-line options is pretty good:
<source lang="bash">
<syntaxhighlight lang="bash">
tidy -m -i -wrap 120 -clean -bare -asxhtml myfile.html
tidy -m -i -wrap 120 -clean -bare -asxhtml myfile.html
</source>
</syntaxhighlight>
;-m
;-m
: causes the file to be modified in place (if you don't want this, then omit the -m and specify an output file with "-o myfile-Tidied.html"
: causes the file to be modified in place (if you don't want this, then omit the -m and specify an output file with "-o myfile-Tidied.html"
Line 26: Line 26:


To really clean up content coming from Microsoft Word, try the following
To really clean up content coming from Microsoft Word, try the following
<source lang="bash">
<syntaxhighlight lang="bash">
tidy -i -wrap 120 -bare -asxhtml --drop-empty-paras yes --drop-font-tags yes --drop-proprietary-attributes yes --word-2000 true myfile.html
tidy -i -wrap 120 -bare -asxhtml --drop-empty-paras yes --drop-font-tags yes --drop-proprietary-attributes yes --word-2000 true myfile.html
</source>
</syntaxhighlight>


== Help ==
== Help ==
Line 219: Line 219:
==Defaults==
==Defaults==
To see what configuration values are presently set (could well be the defaults if you're not using a configuration file)
To see what configuration values are presently set (could well be the defaults if you're not using a configuration file)
<source lang="bash">
<syntaxhighlight lang="bash">
tidy -show-config
tidy -show-config
</source>
</syntaxhighlight>


[[Category:Best Practices]]
[[Category:Best Practices]]
[[Category:Tools]]
[[Category:Tools]]