nabn / web-indent

Automatically exported from code.google.com/p/web-indent
0 stars 0 forks source link

inconsistent indenting in objects, particularly of functions #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
attempt to indent the following object (or dictionary / associative array / 
hashtable, whatever you like to call them):

{
    func1 : function () {
                //indents beneath function keyword
            },
          key2 : 'now in the wrong place',
    a_list : [
        'much better',
    'what??',
    'weird'
        ],
    another_function : function () {
        var inconsistently_ended_up_here;
    },
    another_function: function () {
                          //this time here
}

What is the expected output? What do you see instead?

desired output would be: indentation steps in one after braces or list openers,
indentation returns to normal level for each new key

Original issue reported on code.google.com by harry.pe...@gmail.com on 25 Jan 2011 at 11:58

GoogleCodeExporter commented 8 years ago
Wow.  That is strange and completely incorrect.  I will look into this and get 
back to you.  I'm sorry I've been away for so long.  I'm going to be taking 
some time to get this script back into top form.  

Original comment by pkopr...@gmail.com on 2 Apr 2011 at 1:29

GoogleCodeExporter commented 8 years ago
Hey I looked into to your issue and was able to correctly indent all the text.  
Are you using the latest version?  

Original comment by pkopr...@gmail.com on 17 Apr 2011 at 10:20