question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trailing whitespaces

See original GitHub issue

Hi David,

I quite liked your package and decided to use it as a replacement for language-gfm. However, after a short while I noticed that the trailing spaced started to disappear on save. This is because of a default behaviour in Atom’s workspace package. I tried to disable this by doing what they suggest in readme:

config.cson:

"*":
  ...
  whitespace:
    ".text.md":
      removeTrailingWhitespace: false

Tried a few other ways of expressing my intention in the config, but none worked. Unfortunately, I had to give up and return to gfm, since restoring the whitespaces before every commit is a pain. Could you please update the docs or implement something to make it possible to keep the spaces before the newline characters?

I imagine this can be possible already. In this case the path to the solution is probably too complex or unclear.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
burodepepercommented, May 27, 2016

I think the “error” is in your config.cson. The setting doesn’t seem to work as part of the * scope, but it does (for me) in the .md.text scope. If you scroll quite far down in config.cson you’ll find that particular key there, otherwise add it yourself. The correct config should then be (or at least, this is what works for me):

".md.text":
  whitespace:
    removeTrailingWhitespace: false

Make sure that there is no leading whitespace, otherwise you’re in some other scope.

1reaction
burodepepercommented, May 1, 2017

Update FAQ and README

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trailing whitespaces: what you gonna do about it?
Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline.
Read more >
trailing-whitespace / C0303 - Pylint 2.16.0-dev documentation
Used when there is whitespace between the end of a line and the newline. Problematic code: print("Hello") # [trailing-whitespace] # ^^^ trailing whitespaces....
Read more >
Why is trailing whitespace a big deal? [closed]
In most cases whitespace is there to format the code for human readers. Trailing whitespace may indicate several things including: An incomplete ...
Read more >
Remove Trailing Whitespace String Characters - YouTube
Trim the trailing whitespace characters from a string in C. Source code: ...
Read more >
How to remove the leading and trailing whitespaces in a given ...
How to remove the leading and trailing whitespaces in a given String using the Java trim() methodIn this video, we will have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found