idea-markdown icon indicating copy to clipboard operation
idea-markdown copied to clipboard

Suppressing trailing spaces stripping seems to be broken

Open josdejong opened this issue 11 years ago • 10 comments
trafficstars

Suppression of trailing spaces stripping worked before, but seems to be broken now. Running v0.9.7, WebStorm 9.

See also #33

josdejong avatar Nov 16 '14 13:11 josdejong

I have the same problem in IntelliJ Idea 14.0.2 build 139.659 and idea-markdown 0.9.7

decebals avatar Dec 20 '14 08:12 decebals

I have the same problem in Idea Ultimate 139.659 and idea-markdown 0.9.7, it's very annoying

olegchir avatar Dec 24 '14 22:12 olegchir

Yep.

hypesystem avatar Dec 30 '14 16:12 hypesystem

I had the same problem, found it was caused by the trim_trailing_whitespace = true in my .editorconfig file. See https://youtrack.jetbrains.com/issue/IDEA-134223

srackham avatar Jan 05 '15 20:01 srackham

@srackham if there is a way to work around this within the markdown lib, it would be very nice. I like my whitespace trimmed in general, but not when it's part of the syntax (like it is in markdown).

hypesystem avatar Jan 06 '15 07:01 hypesystem

In Webstorm 9.0.2 I added following to my .editorconfig file and it stopped stripping out whitespace only for markdown files.

[*.md]
trim_trailing_whitespace = false

webuniverseio avatar Jan 17 '15 21:01 webuniverseio

That works for me. You do need the editorconfig plugin for this, though.

pigulla avatar Jan 19 '15 20:01 pigulla

my suggestion would be something like this:

a configuration: "enable post processing on save for syntax supported files" syntax supported files (like php in phpstorm): "post processing on save configuration tab -> trim trailing spaces (boolean)" other files: post processing on save configuration

a plugin like markdown can then add syntax support for markdown and have it's own rules for post processing on save. another feature: each syntax can have their own features - for example: force replace tabs by spaces for python files etc... or even reformat code for specific syntax.

this will be a more general solution than just ignore the setting magically for markdown files..

but anyway for now I'm using the solution by szarouski thx.

tflori avatar Mar 06 '16 11:03 tflori

Notice: This plugin is no more maintained and it has been removed from Jetbrains plugins repository. There is a Markdown plugin officially supported by Jetbrains.

nicoulaj avatar May 22 '16 11:05 nicoulaj

So I have the following in my editorconfig:

[*.{diff,md,less,js}]
trim_trailing_whitespace = false
quote_type = double

However when I save the files it does trim :( but if I disable the feature in PhpStorm it doesn't do it anymore. Help?

agrublev avatar Dec 14 '17 22:12 agrublev