editorconfig
editorconfig copied to clipboard
trim_trailing_whitespaces should ignore comments
I'm writing some JSDoc comments and I noticed that editorconfig doesn't make any distinction between code and comments.
The problem here is that JSDoc makes use of the Markdown convention of 2 trailing whitespaces to be interpreted as newline.
Is this a flaw in the editorconfig specification or of the editor plugin I'm using?
Unfortunately that would be too specific. I wonder whether it is possible to implement this as editor plugins.
Markdown also lets you end a line with \ to force a linebreak, which is less likely to get mangled in general.
Usually the settings made in editorconfig files are simply mapped to existing settings of editors. Editorconfig is not about implementing the underlying functions (Yes, I know, there are plugins that implement some of them itself).
If you have a project, which needs trailing spaces somewhere, say for markdown, your solution is to set trim_trailing_whitespaces to off to make sure all of you project members use the right setting. This will turn the trimming off for code, too. But that's the least common denominator supported by all editors.
necrobumping this here since I have the same problem with Sassdoc, what did you end up doing @FezVrasta?