Page 1 of 1

HTML Formatter

Posted: Mon Jan 21, 2002 10:43 pm
by Ian Cook
Hello,

I was wondering if anyone knew of a Textpad Add-on that will perform HTML formatting or "beautifying". I'm using a program called PrettyHTML now, but it's a hassle to switch between the two programs.

Can anyone point me towards one?

Thanks,

Ian

Re: HTML Formatter

Posted: Sat Jan 26, 2002 4:37 pm
by M. Reader
HTML Tidy does that.

It started as a W3C project and now is open source.

You configure Tidy using a text file you create. (I've got a link to a sample below.)

I've just started playing with Tidy, so I'm no expert.

This is what I've got set up, based on an old message I found in this forum and the Textpad help files. It works nicely so far.

Modify to your setup as needed:

Command: D:\Tidy\TidyDbg.exe
Parameters: -config D:\Tidy\TidyCfg.txt $File
Initial Folder: $FileDir

Check "Capture output"

Regular Expression to Match output: ^line \([0-9]+\) column \([0-9]+\) -

File Register =
Line Register = 1
Column Register =

When run, the errors and/or results are displayed in another window. (This can be changed using the config file.)

Double-click on the error message in the results window and Textpad jumps to the error in the file you are editing.

=========== LINKS =======================================================

Author's original page:

http://www.w3.org/People/Raggett/tidy/

Current open source developers' page with downloads (look for the Win32 version of course), source code, links, etc.:

http://tidy.sourceforge.net/

Quick reference for config file:

http://tidy.sourceforge.net/quickref.html

A review from a Unix mag with a nice sample config file:

http://www.unixreview.com/documents/s=1 ... /0109e.htm

==========================================================

Re: HTML Formatter

Posted: Sat Jan 26, 2002 4:40 pm
by M. Reader
This line got wrapped by the forum software; don't forget the "-" at the end.

Regular Expression to Match output:

^line \([0-9]+\) column \([0-9]+\) -