Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-4064

JS formatting issue with an anonymous function

    Details

      Description

      From stackoverflow: http://stackoverflow.com/questions/8733329/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?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sgibly Shalom Gibly
                Reporter:
                sgibly Shalom Gibly
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code