File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,20 @@ function Update-PipeScript {
77
88 Update-PipeScript is used by PipeScript transpilers in order to make a number of changes to a script.
99
10- It can also be used interactively to transform scripts or text in a number of ways.
10+ It can also be used interactively to transform scripts or text in a number of ways.
11+ . EXAMPLE
12+ Update-PipeScript -ScriptBlock {
13+ param($x,$y)
14+ } -RemoveParameter x
15+ . EXAMPLE
16+ Update-PipeScript -RenameVariable @{x='y'} -ScriptBlock {$x}
17+ . EXAMPLE
18+ Update-PipeScript -ScriptBlock {
19+ #region MyRegion
20+ 1
21+ #endregion MyRegion
22+ 2
23+ } -RegionReplacement @{MyRegion=''}
1124 #>
1225 [Alias (' Update-ScriptBlock' , ' ups' )]
1326 param (
@@ -266,7 +279,7 @@ function Update-PipeScript {
266279
267280 if ($RegionReplacement.Count ) {
268281 foreach ($regionName in $RegionReplacement.Keys ) {
269- $replacementReplacer = $RegexReplacement [$regionName ]
282+ $replacementReplacer = $RegionReplacement [$regionName ]
270283 $RegionName = $RegionName -replace ' \s' , ' \s'
271284
272285 $regionReplaceRegex = [Regex ]::New("
You can’t perform that action at this time.
0 commit comments