Jkleg
Jkleg

Reputation: 240

Aptana 3 - JavaScript formatter

The Aptana JS formatter handles this fine:

Manage.init = function() {
  --code here--
}

but it formats this:

$('#tab1').click(function() {
    $('li.voting.active').length === 0 ? Manage.loadTab(1) : Manage.loadVotingTab(1);
});

into:

$('#tab1').click(function() {$('li.voting.active').length === 0 ? Manage.loadTab(1) : Manage.loadVotingTab(1);
});

(the formatting not only removes the line break after the opening brace (shown here), but it also adds one line break added above and two below the block (not shown here)).

I can't find any formatter settings that change this. The correct behavior here would be to leave the code as it is. Any suggestions?

Upvotes: 2

Views: 552

Answers (1)

sgibly
sgibly

Reputation: 3838

Yep. It's a bug, and I just opened an issue on the Appcelerator BTS at http://jira.appcelerator.org/browse/APSTUD-4064

Add yourself as a 'watcher' to be notified when it's done.

Thanks!

Upvotes: 1

Related Questions