idea-markdown
idea-markdown copied to clipboard
Suppressing trailing spaces stripping seems to be broken
Suppression of trailing spaces stripping worked before, but seems to be broken now. Running v0.9.7, WebStorm 9.
See also #33
I have the same problem in IntelliJ Idea 14.0.2 build 139.659 and idea-markdown 0.9.7
I have the same problem in Idea Ultimate 139.659 and idea-markdown 0.9.7, it's very annoying
Yep.
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 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).
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
That works for me. You do need the editorconfig plugin for this, though.
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.
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.
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?