@@ -67,10 +67,24 @@ function Test-Fluff {
67
67
$InputObject.PSObject.Properties.Name -contains $For -and
68
68
-not $InputObject .$For
69
69
) -and
70
- $InputObject._copy.source -in $brew._meta.sources.json -and
71
70
$InputObject._copy._mod .$For -ne " remove"
72
71
) {
73
- Write-Output (Test-Fluff $brew.monsterFluff [$brew.monsterFluff.name.indexOf ($InputObject._copy.name )] - For $For )
72
+ if (
73
+ $InputObject._copy._mod .$For.mode -in @ (
74
+ " appendArr"
75
+ " prependArr"
76
+ " replaceArr"
77
+ " insertArr"
78
+ " replaceOrAppendArr"
79
+ " appendIfNotExistsArr"
80
+ )
81
+ ) {
82
+ Write-Output $true
83
+ } elseif ($InputObject._copy.source -in $brew._meta.sources.json ) {
84
+ Write-Output (Test-Fluff $brew.monsterFluff [$brew.monsterFluff.name.indexOf ($InputObject._copy.name )] - For $For )
85
+ } else {
86
+ Write-Output $false
87
+ }
74
88
} else {
75
89
Write-Output $false
76
90
}
@@ -110,21 +124,7 @@ if ((Test-Path $Path)) {
110
124
if ($Log -in @ (" changes" , " all" )) {
111
125
Write-Host (" Tagged " + ($target -replace ' ^.*[\\/]([^\\/]+[\\/][^\\/]+)$' , ' $1' ))
112
126
}
113
- (
114
- [Regex ]::Replace(
115
- (ConvertTo-Json $brew - Depth 99 - Compress),
116
- " \\u(?<Value>\w{4})" ,
117
- {
118
- PARAM ($Matches )
119
- (
120
- [char ](
121
- [int ]::Parse($Matches.Groups [' Value' ].Value,
122
- [System.Globalization.NumberStyles ]::HexNumber)
123
- )
124
- ).ToString()
125
- }
126
- ) -replace ' —' , ' \u2014' -replace ' –' , ' \u2013' -replace ' −' , ' \u2212'
127
- ) | Out-File - FilePath $target - Encoding Utf8
127
+ ConvertTo-Json $brew - Depth 99 | Out-File - FilePath $target - Encoding Utf8
128
128
} elseif ($Log -in @ (" skips" , " all" )) {
129
129
Write-Host (" Left unchanged " + ($target -replace ' ^.*[\\/]([^\\/]+[\\/][^\\/]+)$' , ' $1' ))
130
130
}
0 commit comments