You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Christian Lenz (JIRA)" <ji...@apache.org> on 2018/11/09 13:37:00 UTC

[jira] [Created] (NETBEANS-1641) Adding real formatting/beautifier for JS

Christian Lenz created NETBEANS-1641:
----------------------------------------

             Summary: Adding real formatting/beautifier for JS
                 Key: NETBEANS-1641
                 URL: https://issues.apache.org/jira/browse/NETBEANS-1641
             Project: NetBeans
          Issue Type: New Feature
          Components: javascript - Editor, javascript - Formatting &amp; Indentation
    Affects Versions: 8.2, 10.0
            Reporter: Christian Lenz


When I try to format JS code which looks like this:
{code:javascript}var test = {foo: [{bar: 3}]};var test2 = {foo: [{bar: 3}]};var test3 = {foo: {bar: [4]}};{code}

It will format it like this:
{code:javascript}
var test = {foo: [{bar: 3}]};
var test2 = {foo: [{bar: 3}]};
var test3 = {foo: {bar: [4]}};
{code}

But expected behavior is a well formatted/beautified JS code, which should look like this:

{code:javascript}
var test = {
    foo: [
        {
            bar: 3
        }
    ]
};

var test2 = {
    foo: [{
        bar: 3
    }]
};

var test3 = {
    foo: {
        bar: [4]
    }
};
{code}

Based on the formatting rules.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists