Skip to content

Adding trimTextTrailingWhitespaceCommand #211093

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

reed2ep
Copy link

@reed2ep reed2ep commented Apr 23, 2024

#209939.
Changes include:

  • Addition of "trimTextTrailingWhitespaceCommand.ts"
    This command inherits from "trimTrailingWhitespaceCommand" to provide the same behavior except in the case of
    whitespace-only lines.
  • Addition of "trimTextTrailingWhitespaceCommand.test.ts"
    Since the base behavior is inherited and already tested, i elected to test just the new functionality here.
  • Addition of "trimTextTrailingWhitespaceCommand to the linesOperations.ts in order for it to be added to ui.

@reed2ep
Copy link
Author

reed2ep commented Apr 23, 2024

@microsoft-github-policy-service agree

@aiday-mar
Copy link
Contributor

Hi @reed2ep thank you for making this PR and apologies for the long delay. I will have a look at the PR now.

@aiday-mar
Copy link
Contributor

Hi I just noticed that in the new class you added TrimTextTrailingWhitespaceCommand you added a protected method trimTrailingWhitespace. Is this method supposed to override the corresponding function in the file trimTrailingWhitespaceCommand.ts? Unfortunately the corresponding function there is not a method of the class and can not be overridden. The code in the current PR does not seem to work. I think your idea is promising but it requires more work and a refactoring of the trimTrailingWhitespaceCommand.ts file.

@aiday-mar aiday-mar added changes-requested editor-autoindent Editor auto indentation issues labels Jun 5, 2025
@aiday-mar aiday-mar changed the title Feature 209939 Adding trimTextTrailingWhitespaceCommand Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes-requested editor-autoindent Editor auto indentation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants