Hi folks,
I'm working with a web service that creates a lot of complex attributes within 
various HTML tags. So, I'm looking for a way to persuade TextWrangler to 
soft-wrap HTML text at the start of each tag's attributes, so that

<td class="something" id="something_else" onclick="another_thing" ... ... 
ondblclick="one_more_thing">

becomes

<td 
        class="something" 
        id="something_else" 
        onclick="another_thing" 
        ...

        ...
        ondblclick="one_more_thing">

I found this this UNIX Filter that makes a good start, by wrapping an OSX tidy 
service and forcing soft-wrapping by tag and then page width (the '200')...

/usr/bin/tidy -utf8 -asxhtml -indent -wrap 200 -quiet "$1" 2> /dev/null

However, I can't seem to get the syntax correct to wrap tag attributes from 
this guide to Tidy 
http://tidy.sourceforge.net/docs/quickref.html#wrap-attributes, as the 
following attempts clear the text view in TextWrangler.

/usr/bin/tidy -utf8 -asxhtml -indent -wrap-attributes="true" -wrap 200 -quiet 
"$1" 2> /dev/null

/usr/bin/tidy -utf8 -asxhtml -indent -wrap-attributes -wrap 200 -quiet "$1" 2> 
/dev/null

Any insights gratefully received.
Best,
Keith.. 
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to