Skip to content

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

Open

Description

@vors

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

Activity

  1. omniomi commented on May 26, 2018

    @omniomi
    Contributor

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

  2. vors commented on May 26, 2018

    @vors
    ContributorAuthor

    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.

  3. msftrncs commented on Jul 11, 2018

    @msftrncs
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions