Skip to content

fix for auto completion with escape sequence chars #1040

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

Conversation

msivasubramaniaan
Copy link
Contributor

What does this PR do?

This PR suggest characters with escape chars if needed

What issues does this PR fix or reference?

redhat-developer/vscode-yaml#1097

Is it tested? How?

Yes added test case for the fix

@coveralls
Copy link

Coverage Status

coverage: 84.075% (-0.06%) from 84.136%
when pulling d3cf06d on msivasubramaniaan:fix-unescaped-char-at-completion
into 11eff5f on redhat-developer:main.

2 similar comments
@coveralls
Copy link

Coverage Status

coverage: 84.075% (-0.06%) from 84.136%
when pulling d3cf06d on msivasubramaniaan:fix-unescaped-char-at-completion
into 11eff5f on redhat-developer:main.

@coveralls
Copy link

Coverage Status

coverage: 84.075% (-0.06%) from 84.136%
when pulling d3cf06d on msivasubramaniaan:fix-unescaped-char-at-completion
into 11eff5f on redhat-developer:main.

@datho7561
Copy link
Contributor

This doesn't fix issue for me. Make the following document, and open completion at the |:

# yaml-language-server: $schema=https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json
|

Accept the completion "New Grammar".

The generated content is still broken.

@msivasubramaniaan
Copy link
Contributor Author

@datho7561 The autocomplete on parent level not be possible with escape chars. We have workaround only at the level of each key. Please try on the level of begin and end

@datho7561
Copy link
Contributor

The bug report was about the completing the content using the "New Grammar" completion. In order to address the bug, the "New Grammar" completion should work as expected, with the quotes properly escaped when necessary.

@msivasubramaniaan
Copy link
Contributor Author

Yes but we can do the workaround only. Complete fix not be possible. I've tried it out fully.

Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Okay. We should keep the original issue open since this doesn't fix it, but I agree that this is worth merging because it addresses the issue you wrote a test case for.

@msivasubramaniaan msivasubramaniaan merged commit 4602af7 into redhat-developer:main Apr 7, 2025
4 checks passed
@msivasubramaniaan msivasubramaniaan deleted the fix-unescaped-char-at-completion branch April 7, 2025 13:19
@datho7561
Copy link
Contributor

Thank you Muthu, sorry for stalling the merge.

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.

3 participants