-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix UNC intellisense backslash #1044
Fix UNC intellisense backslash #1044
Conversation
😕 |
|
||
// Since we want to use a "tab stop" we need to escape a few things for Textmate to render properly. | ||
var sb = new StringBuilder(completionDetails.CompletionText) | ||
.Replace("\\", "\\\\") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might consider using a verbatim string here e.g. .Replace(@"\", @"\\")
and below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use verbatim strings on lines 2017 & 2018 as well. Makes the reading of "replaced this with that" easier if you don't have to mentally convert esc sequences. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, yeah that's definitely nit-picking. :-) Overall LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, they're everywhere now - and they're perfectly lined up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* fix UNC intellisense backslash * use here string * here everywhere
fixes PowerShell/vscode-powershell#2116
This escapes all
\
}
and$
so that the intellisense is properly escaped for Textmate to render it.(yes, we don't need to escape
{
)