Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested braces indentation #223

Closed
azmeuk opened this issue Apr 4, 2013 · 3 comments
Closed

Nested braces indentation #223

azmeuk opened this issue Apr 4, 2013 · 3 comments

Comments

@azmeuk
Copy link

azmeuk commented Apr 4, 2013

Hi.
The following code produce the following result:

Foo.bar.foobar.push({
  foo: false,
  bar: null,
});
{{{ fooBar('foo', 'bar', 'Foobar', 'bar') }}};
Foo.bar.foobar.push({
  foo: false,
  bar: null,
}); {
  {
    {
      fooBar('foo', 'bar', 'Foobar', 'bar')
    }
  }
};

But I would expect it to don't change anything.
You can see this case in this file, and read the explanation of this syntax.
Maybe a rule for nested braces and a rule for opening braces after a semicolon are required ?

@evocateur
Copy link
Contributor

Does simple 'macro' substitution, using Django-like syntax, {{{ code }}} will be replaced with |eval(code)|.

This same file also contains #ifdef-style preprocessor commands inline, and is arguably no longer valid JS (in its raw form). If the raw source does not pass the most liberal JSHint rules, how are we supposed to justify the increased parser complexity?

@bitwiseman
Copy link
Member

Unlikely to be implmented any time soon. Javascript appears in so many flavors, it would be easy to go wild trying to handle all of them.

@azmeuk
Copy link
Author

azmeuk commented Jul 19, 2019

Ah ah. I have totally forgotten this 6 years old issue :) Thanks I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants