Skip to content

Commit 9e4349f

Browse files
committed
Allow indented comments in line continuation
1 parent c6f8cb1 commit 9e4349f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

PowerShell.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ contexts:
12691269
1: invalid.illegal.unexpected-whitespace.powershell
12701270

12711271
line-continuation-body:
1272-
- match: ^
1272+
- match: ^(?!\s*#)
12731273
pop: 1
12741274

12751275
comma-separators:

Tests/syntax_test_PowerShell.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ $a3[1..2]
945945
# ^^^^ meta.number.float.decimal.powershell constant.numeric.value.powershell
946946
# ^ punctuation.separator.decimal.powershell
947947
# ^ punctuation.separator.continuation.line.powershell
948+
# An indented comment doesn't interrupt line continuation
948949
-p3 $value | Invoke-Something -verbose
949950
#^^^^^^^^^^^^^^ meta.function-call.arguments.powershell
950951
# ^^^ variable.parameter.option.powershell

0 commit comments

Comments
 (0)