Skip to content

Commit 0a5f559

Browse files
Fix unquoted strings leaking into quotes (SublimeText#229)
Fixes SublimeText#228
1 parent 54901a3 commit 0a5f559

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

PowerShell.sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ contexts:
339339

340340
inside-unquoted-string:
341341
- meta_include_prototype: false
342-
- meta_scope: string.unquoted.powershell
343-
- match: $|(?=[\s#|>;,()}])
342+
- meta_scope: meta.string.powershell string.unquoted.powershell
343+
- match: $|(?=[\s#|>;,()}"'])
344344
pop: 1
345345
- match: \{
346346
push: inside-unquoted-string-brace

tests/syntax_test_strings.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,3 +794,11 @@
794794
# ^ punctuation.definition.keyword.powershell
795795
# ^^^^^ meta.number.float.decimal.powershell constant.numeric.value.powershell
796796
# ^ punctuation.separator.decimal.powershell
797+
798+
###[ Real Samples ]############################################################
799+
800+
git -c http.extraheader="AUTHORIZATION: Basic $base64Pat" pull origin main-vs-deps
801+
# @@@ reference
802+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string
803+
# ^^^^^^^^^^^^^^^^^ string.unquoted
804+
# ^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double

0 commit comments

Comments
 (0)