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

JSX syntax highlighting breaks when using default values for destructred parameter #32493

Closed
chipit24 opened this issue Aug 14, 2017 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) grammar Syntax highlighting grammar javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@chipit24
Copy link

  • VSCode Version: Code 1.15.0 (8b95971, 2017-08-09T20:06:21.685Z)
  • OS Version: Darwin x64 16.7.0
  • Extensions:
Extension Author (truncated) Version
sort-lines Tyr 1.3.0
project-manager ale 0.19.0
path-intellisense chr 1.4.2
vscode-eslint dba 1.2.11
RelativePath jak 1.0.0
cpptools ms- 0.12.2
final-newline sam 0.3.2
highlight-matching-tag vin 0.4.4

(2 theme extensions excluded)


Steps to Reproduce:

  1. Create a new file and set the language mode to "JavaScript React"
  2. Add the following code:
const button = ({
  className
}) => (
  <div className={className}>
    Click me!
  </div>
);
  1. Add a default value for className in the destructured object parameter:
const button = ({
  className = 'button'
}) => (
  <div className={className}>
    Click me!
  </div>
);
  1. After this change, observe that JSX syntax highlighting is broken.
    jsx-syntax-broken

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the javascript JavaScript support issues label Aug 14, 2017
@mjbvz mjbvz added grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Aug 16, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Aug 16, 2017

Thanks. This is already tracked upstream by microsoft/TypeScript-TmLanguage#499

@mjbvz mjbvz closed this as completed Aug 16, 2017
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 16, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) grammar Syntax highlighting grammar javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants