Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Formatter adds spaces around a hyphen, but only if it is followed by a variable #847

Copy link
Copy link
@exchange12rocks

Description

@exchange12rocks
Issue body actions

Unformatted code:

$Var = 6
(Get-Date).AddDays(-6)
(Get-Date).AddDays(-$Var)

Formatted code:

$Var = 6
(Get-Date).AddDays(-6)
(Get-Date).AddDays( - $Var)

As you can see, the formatter adds spaces around a hyphen which is followed by a variable but does not add them if a hyphen is followed by a number. I think, the behavior should be consistent.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.