Skip to content

Fix 1698#1720

Open
Dipanshusinghh wants to merge 5 commits into
elementary:masterfrom
Dipanshusinghh:fix-1698
Open

Fix 1698#1720
Dipanshusinghh wants to merge 5 commits into
elementary:masterfrom
Dipanshusinghh:fix-1698

Conversation

@Dipanshusinghh
Copy link
Copy Markdown
Contributor

Preferences:- Exclude Markdown and YAML from whitespace stripping
This fix the trailing whitespace stripping behavior on save:--

Dipanshusinghh and others added 3 commits May 11, 2026 21:02
)

Trigger symbol refresh when the document is reloaded externally (e.g., via git reset) or reverted, rather than relying solely on internal buffer changes.
This fixes the trailing whitespace stripping behavior on save:
- Excludes Markdown and YAML files where trailing whitespace can be semantically meaningful.
- Adds description/subtext in the settings switch to clarify that it only applies to syntax-highlighted files, except Markdown and YAML.

Fixes elementary#1698
@Dipanshusinghh
Copy link
Copy Markdown
Contributor Author

Hi @jeremypw,

I've implemented the exclusion list and updated the settings switch description to list Markdown and YAML as exclusions, matching the 'smart cut/copy' style.

Btw, earlier I was planning to solve both #1698 and #1699 together, but decided to separate them to keep the PR clean. I will submit the PR for #1699 after this is reviewed.
Really enjoying working on elementary OS issues, it is a great learning experience. Looking forward to contributing more.
Let me know if any changes are needed. Thanks!

@jeremypw
Copy link
Copy Markdown
Collaborator

I agree those two issues should be considered in separate PRs, they are not sufficiently interdependent to deal with together. Will review this one shortly.

@Dipanshusinghh
Copy link
Copy Markdown
Contributor Author

will create separate PRs for both issues to avoid any conflicts. Thanks for the feedback, looking forward to your review!

Copy link
Copy Markdown
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

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

This works as expected.

The only thing I am unsure about is the wording of the label subtext. "Syntax highlighting" may not be turned on and some source languages may not have any visible highlighting yet trailing spaces are still stripped. It may be sufficient just to say "Except Plain Text, MarkDown and YAML"?

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.

Stripping of trailing whitespace affects only some files; no UI indication which types

3 participants