-
Notifications
You must be signed in to change notification settings - Fork 0
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
AddConditionalToSurroundingPairs2 #22
base: main-os
Are you sure you want to change the base?
Conversation
That's is needed so that we are no able to select a part of a string (which is already surrounded by quotes) and surround it by other chars, like sharp for example. We want the selected string to be replaced and not surrounded.
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "monaco-editor-core", | |||
"private": true, | |||
"version": "0.31.1-os", | |||
"version": "0.31.1-os2-cnh-3", |
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.
Don't understand this versioning. According the rules it should be 0.31.1-os1, right?
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.
Hey, @os-lmo ...it has been a long time since I've done this PR. So, I need some time to switch and look at it again. That version was a temporary change in order to test. Of course the final version would follow the rules.
@@ -61,7 +61,7 @@ export interface LanguageConfiguration { | |||
* selected string is surrounded by the open and close characters. If not set, the autoclosing pairs | |||
* settings will be used. | |||
*/ | |||
surroundingPairs?: IAutoClosingPair[]; | |||
surroundingPairs?: IAutoClosingPairConditional[]; |
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.
In the original repo, this type was not changed - https://github.com/microsoft/vscode/blob/5a139d4ffc72fb8100c789bf2f67c09e5c33d05c/src/vs/editor/common/languages/languageConfiguration.ts#L64
Did you open any discussion or issue in the vscode main repo to discuss this change?
@@ -260,8 +260,14 @@ export class LanguageConfigurationFileHandler { | |||
console.warn(`[${languageId}]: language configuration: expected \`surroundingPairs[${i}].close\` to be a string.`); | |||
continue; | |||
} | |||
if (typeof pair.notIn !== 'undefined') { | |||
if (!isStringArr(pair.notIn)) { |
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.
Consider merge both ifs
Ups @os-lmo, this PR should still be in Draft mode. Our bad 🙏🏽 |
That's is needed so that we are no able to select a part of a string (which is already surrounded by quotes) and surround it by other chars, like sharp for example. We want the selected string to be replaced and not surrounded.
This PR fixes #