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

Simple string breaks vscode's and github's syntax highlighting #809

Closed
pushkine opened this issue Mar 9, 2020 · 3 comments
Closed

Simple string breaks vscode's and github's syntax highlighting #809

pushkine opened this issue Mar 9, 2020 · 3 comments

Comments

@pushkine
Copy link

pushkine commented Mar 9, 2020

  • VSCode Version: 1.42.1
  • OS Version: windows_nt 1903

Paste the following line into a javascript file :

;(false ? '' : ') =>') + ''

anything coming after it won't get parsed

console.log()
Object.assign()
;(false ? '' : ') =>') + ''
console.log()
Object.assign()

...github breaks on it too, guess y'all use the same stuff

edit :
github fails on preview but still applies syntax after posting
on vscode, the first example only breaks the following line,
here is another that breaks the whole end of the file

(false ? '' : ') =>') + `${''}`
@retnikt
Copy link

retnikt commented Mar 9, 2020

this alone:

console.log()
(false ? 3 : ') =>')
console.log()

breaks it too

@pushkine
Copy link
Author

pushkine commented Mar 9, 2020

@retnikt sure, my example forces the formatter to keep the parentheses so it eliminates the "parser is waiting for input" hypothesis as they would not be of any use otherwise

github fails on preview but still applies syntax after posting

To reproduce :

  • Post that code
  • Edit your post
  • Confirm update

chrome_2020-03-09_19-24-26

goes away on ctrl+f5

@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 9, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Mar 9, 2020

I confirmed this using the latest grammar from master. I believe the issue is that (false ? '' : ') => gets parsed as an arrow expression

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

No branches or pull requests

3 participants