We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3695b3a commit 1787858Copy full SHA for 1787858
Formatting/YAML.format.ps1
@@ -1,3 +1,15 @@
1
Write-FormatView -Typename YAML -Action {
2
- Format-YAML -inputObject $_
+ $inputObject = $_
3
+ if ($inputObject.psobject.properties['Indent'].Value -as [int]) {
4
+ $indentLevel = $inputObject.Indent -as [int]
5
+ $inputCopy = [Ordered]@{}
6
+ foreach ($prop in $inputObject.psobject.properties) {
7
+ if ($prop.Name -eq 'indent') { continue }
8
+ $inputCopy[$prop.Name] = $prop.Value
9
+ }
10
+ Format-YAML -inputObject $inputCopy -Indent $indentLevel
11
+ } else {
12
+ Format-YAML -inputObject $inputObject
13
14
+
15
}
0 commit comments