PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

stop-parsing symbol doesn't stop PowerShell highlighting #113

Closed keith-hall closed 6 years ago

keith-hall commented 6 years ago

Environment

Issue Description

The PowerShell "stop-parsing" symbol is scoped correctly, but doesn't prevent the rest of the line being highlighted as PowerShell code.

Screenshots

image

Expected Behavior

The rest of the line following --% should be scoped as string.unquoted with no PowerShell constructs scoped like $VarName or /.

Code Samples

tf.exe status . /r --% /workspace:*;domain\$UserName

(code taken from https://stackoverflow.com/a/18928501/4473405)

omniomi commented 6 years ago

Just need to add a capture for anything until the end of the line and make sure the stop-processing symbol is high in the definitions.