Skip to content

Commit e62352f

Browse files
committed
Allow indented comments in line continuation
1 parent 7dc10a5 commit e62352f

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
@@ -1270,7 +1270,7 @@ contexts:
12701270
1: invalid.illegal.unexpected-whitespace.powershell
12711271

12721272
line-continuation-body:
1273-
- match: ^
1273+
- match: ^(?!\s*#)
12741274
pop: 1
12751275

12761276
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)