SUMMARY *** The "remove trailing spaces" option[1] is very useful, except for Markdown files where two space denote a line break. Could there be an exception for Markdown files that the two spaces at the end of the line are preserved? *** [1] https://kate-editor.org/2012/10/27/remove-trailing-spaces/ [2] (https://www.markdownguide.org/basic-syntax/#line-breaks) SOFTWARE/OS VERSIONS Kubuntu 21.10
*** Bug 453319 has been marked as a duplicate of this bug. ***
Can you still reproduce this in 22.04? I think this has been fixed for Markdown files.
(In reply to Eric Armbruster from comment #2) > Can you still reproduce this in 22.04? I think this has been fixed for > Markdown files. Yes, I can still reproduce it in 22.04.
(In reply to Pierre Fernagu--Berthier from comment #3) > (In reply to Eric Armbruster from comment #2) > > Can you still reproduce this in 22.04? I think this has been fixed for > > Markdown files. > > Yes, I can still reproduce it in 22.04. I confirm, it is still reproducible in Ubunut 22.04.
Sorry, I meant Kate version 22.04. In Kate go to Help->About Kate to see the Kate version. Please check again, whether you can reproduce this bug with this version.
I have check and I have found the solution. In Settings->Configure Kate, than Open/Save->General and change 'Remove trailing spaces' to never. None the less, thanks for your help.
Please leave this bug report open, as the reporter explicitly asks for not removing trailing spaces in Markdown in the case where remove trailing spaces is set until I either get confirmation that this is fixed in 22.04 Kate or I find the fix in the git log.
Luckily on my Manjaro box I got the 22.04.0 version of kate a bit faster than with Kubuntu. I checked again, but the problem remains: on Markdown documents still all whitespaces at the end of the line are removed when the configuration says it should remove all trailing whitespaces while saving including the double whitespace signaling line break.
this bug is still present here with Kate V 22.12.3 (Debian bookworm packages), and, even worse, also when remove trailing spaces upon save is disabled/not set at all - see also https://discuss.kde.org/t/kate-always-strips-spaces-blanks-at-line-end/7177 . so, kate is just not usable for editing markdown files.
This setting can be changed per file type from settings: Configure Kate -> Open/Save -> Modes & FileTypes Then - Select Markdown in Filetype - In Variables, change 'remove-trailing-spaces' to what you want. There's a button on the far right that helps you do that visually. This can be preset in KTextEditor for the users.
Created attachment 163151 [details] kate settings
thanks for reply, it works now, see attachment before. I think I had not set file/mime type before.