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, since it wastes
less space, but I digress.) */
var x = function()
{
  return function()
  {
    return 0;
  }
};

Astyle likes to format in this matter:
var x = function()
          {
             return function()
                      {
                          return 0;
                      }
          }
Which is horrible.. increases nesting depth insanely.
(may not show up right because I'm editing in Nabble's text-area
-- 
View this message in context: 
http://www.nabble.com/JS-Source-code-Formatter---Anyone-know-of-any-good-ones-tf3262125.html#a9268965
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to