Bug 496967 - kate remove trailing space on save does not work
Summary: kate remove trailing space on save does not work
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.08.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-03 01:15 UTC by Jimmy Berry
Modified: 2024-12-03 16:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
trailing spaces are even highlighted but remain after saving (6.42 KB, image/png)
2024-12-03 01:16 UTC, Jimmy Berry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Berry 2024-12-03 01:15:39 UTC
Setting on "On Modified Lines" or "In Entire Document" both do nothing on save. The trailing spaces are even marked visually since that option is enabled. Prior version (I'd have to dig to know when it ended) removed trailing spaces for years.
Comment 1 Jimmy Berry 2024-12-03 01:16:55 UTC
Created attachment 176307 [details]
trailing spaces are even highlighted but remain after saving
Comment 2 Waqar Ahmed 2024-12-03 04:38:04 UTC
What wad the language of document? Was it markdown? Also,Check your filetype settings
Comment 3 Jimmy Berry 2024-12-03 04:40:16 UTC
It was markdown .md. Kate shows "Markdown" in the language selection field at the bottom right of status bar. Are there white-space setting per file type somewhere?
Comment 4 Waqar Ahmed 2024-12-03 05:38:49 UTC
> It was markdown .md. Kate shows "Markdown" in the language selection field at the bottom right of status bar.

Then the behavior is intentional. Trailing spaces are meaningful in markdown e.g 2 trailing spaces means a line break.

> Are there white-space setting per file type somewhere?

Yes. Settings -> Open/Save -> Modes/Filetype -> markdown
Comment 6 Jimmy Berry 2024-12-03 15:57:34 UTC
Ok, changing the setting there make it work again! Thanks, I had no idea. I presume the default changed then?
Comment 7 Waqar Ahmed 2024-12-03 16:12:25 UTC
> I presume the default changed then?

Yes.