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

Highlighting for strings with "$(...)" is inconsistent #106

Open
vors opened this issue May 26, 2018 · 3 comments
Open

Highlighting for strings with "$(...)" is inconsistent #106

vors opened this issue May 26, 2018 · 3 comments
Labels

Comments

@vors
Copy link
Collaborator

vors commented May 26, 2018

Moved from SublimeText/PowerShell#66

Environment

  • Editor and Version (VS Code, Atom, Sublime): Sublime
  • Your primary theme: Default

Issue Description

$(...) inside a string is an expression interpolation.
Ideally it should be highlighted exectly the same way as it's highlighted when put outside of the string context.
I'm not sure it's possible to achive with regex grammar.

Screenshots

Sublime -- difference between interpolated and non-interpolated
image

Expected Behavior

PowerShell_ISE -- both are the same
image

Code Samples

"blablabla $(invoke-foo baz $a.bar) blablabla"
invoke-foo baz $a.bar
@omniomi
Copy link
Collaborator

omniomi commented May 26, 2018

This would be easier with .sublime-syntax but I'll see what we can do within .tmLanguage.

@vors
Copy link
Collaborator Author

vors commented May 26, 2018

Yeah, sublime-syntax is more powerful then tmLanguage, but the benefits of having a common EditorSyntax (that we finally got) outweigh the benefits of more expressive grammar rules.

@omniomi omniomi added the bug label May 31, 2018
@msftrncs
Copy link
Contributor

also see the images in this issue:

PowerShell/vscode-powershell#1401

It shows the static methods referenced in the first couple lines are colored wrong. Didn't realize it right away, as everything else looks pretty consistent.

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

No branches or pull requests

3 participants