tamzinblake / js3-mode

A chimeric fork of js2-mode and js-mode
GNU General Public License v3.0
180 stars 13 forks source link

incorrect comma first behaviour #8

Closed tamzinblake closed 13 years ago

tamzinblake commented 13 years ago
var x = function(test){
  if(test === 'test') {
    return {
      a: 1
  , b: 2
    }
  } else {
    return {}
  }
};

where it should look like:

var x = function(test){
  if(test === 'test') {
    return {
      a: 1
    , b: 2
    }
  } else {
    return {}
  }
};

but this:

var y = function(test){
  return {
    a: 1
  , b: 2
  }
};

is ok as you see.

also this:

var x = function(test){
  if(test === 'test') {
    return {
      a: 1,
      b: 2
    }
  } else {
    return {}
  }
};

indents ok also.

tamzinblake commented 13 years ago

Originally submitted by @pigmej here

tamzinblake commented 13 years ago

closed by commit 66451ad

see alternate_styles.js

tamzinblake commented 13 years ago

See the wiki at https://github.com/thomblake/js3-mode/wiki/AlternateStyles