Tsz Ming WONG wrote:
>
> maybe
>
> http://astyle.sourceforge.net/ ?
>
> you might need to tweak the settings for javascript.
>
>
This seems the ideal tool to me, however it completely screws up when
dealing w/ function creation..
Ex:
/* Desired target for where I work (I prefer inline braces
Just wondering... does anyone know of any good source-code formatters for
JavaScript. I see plenty that use the dirt-simple eval().tostring trick
but that doesn't work good/right.
It'd be best if the formatter was a console app, so I could script it to
clean up the code in the tree.
Another
I just loaded an XML page and it caused an error to show up in FireBug. I
tracked it down easily and found that the following code should solve the
problem. The script assumed that there would always be a 'head' element in
a file, this fixes that issue.
var head = document.getElementsByTagName(