File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
src/vs/workbench/contrib/terminal/browser/media Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,12 @@ if ($env:VSCODE_ENV_APPEND) {
52
52
function Global :__VSCode-Escape-Value ([string ]$value ) {
53
53
# NOTE: In PowerShell v6.1+, this can be written `$value -replace '…', { … }` instead of `[regex]::Replace`.
54
54
# Replace any non-alphanumeric characters.
55
- $Result = [regex ]::Replace($value , ' [ \\\n;]' , { param ($match )
55
+ [regex ]::Replace($value , " [ $ ( [ char ] 0x1b ) \\\n;]" , { param ($match )
56
56
# Encode the (ascii) matches as `\x<hex>`
57
57
-Join (
58
58
[System.Text.Encoding ]::UTF8.GetBytes($match.Value ) | ForEach-Object { ' \x{0:x2}' -f $_ }
59
59
)
60
60
})
61
- # `e is only availabel in pwsh 6+
62
- if ($PSVersionTable.PSVersion.Major -lt 6 ) {
63
- $Result = $Result -replace " `e " , ' \x1b'
64
- }
65
- $Result
66
61
}
67
62
68
63
function Global :Prompt () {
You can’t perform that action at this time.
0 commit comments