Skip to content
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

Draft
wants to merge 4 commits into
base: main-os
Choose a base branch
from

Conversation

OS-liviaschneider
Copy link

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 #

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",
Copy link
Collaborator

@os-lmo os-lmo May 2, 2023

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?

Copy link

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[];
Copy link
Collaborator

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)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider merge both ifs

@JMano
Copy link

JMano commented May 2, 2023

Ups @os-lmo, this PR should still be in Draft mode. Our bad 🙏🏽

@JMano JMano marked this pull request as draft May 2, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants