-
Notifications
You must be signed in to change notification settings - Fork 60
Whitespace stripped from markdown despite settings, doesn't work with text.md
scope
#185
Comments
Thanks for the report - I'm unable to reproduce with 1.33.0 on macOS 10.12.6. Can you share your settings for |
Both are activated. |
Hmm, I wonder if there's some setting/config somewhere causing the issue? If you temporarily reset to factory defaults, can you still reproduce? |
I have no access to the machine for the next days. Stay tuned… |
After resetting to the factory settings, the problem was solved until I reinstalled the package language-markdown. (On the linux machine is not installed…) I will report a bug for language-markdown. |
Or perhaps it's the combination of |
There's an existing issue for this on that package repository: burodepeper/language-markdown#200 Looks like it was closed as resolved in #177 and that change is available in 1.33.0. @burodepeper 👋 - am I misunderstanding #177? It seems like |
@rsese It's not as much that |
This supports my assumtion, that there is a problem with combination of After adding
to my I agree with @burodepeper that |
I made a mistake in atom#177. For whatever reason, I wrote a quick patch in my browser, and obviously, this code would never yield anything useful, _because it is just silly javascript_. The discussion in atom#185 made me verify my patch. This new patch should actually do something, while I have to admit that I've only verified it via Chrome's console. My test below seems valid enough. ```js const markdownGrammars = ['source.gfm', 'text.md'] let grammarScopeName = 'text.md' markdownGrammars.includes(grammarScopeName) // true grammarScopeName = 'source.js' markdownGrammars.includes(grammarScopeName) // false ```
Just circling back to this, thanks @burodepeper! I'll edit this issue body today so it's clear the problem is that the whitespace package isn't working with the |
text.md
scope
Um... I made a PR for this, but it was attached to the wrong repository... is it possible to migrate it, or should I create a new one from scratch? |
I haven't had time to add tests to my previous PR. If you find time to do it for yours, feel free to do so, then I'll remove my PR. |
I don't know how to add tests, and couldn't find how to test manually on my machine (couldn't find this package files within atom directories). Is there some documentation for this? |
Our documentation on writing tests is here (it covers running tests as well): https://flight-manual.atom.io/hacking-atom/sections/writing-specs/ If you need help writing automated tests for Atom, check out Discuss, the official Atom and Electron message board or join the Atom Slack team. There are a bunch of helpful community members that should be willing to point you in the right direction (I'm not an engineer so can't help you myself unfortunately). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rsese Thanks, will look at it, hopefully soon - I'm too busy these days with work. |
Edit by @rsese to describe the larger issue
As mentioned in #185 (comment):
I believe #177 was supposed to add this functionality so that the whitespace package worked with the
text.md
scope but as mentioned in #185 (comment) (the author of #177), it looks like it may not have done what was intended.The result is that if you use
language-markdown
(as in this report), the whitespace package will still strip trailing whitespace on save in Markdown files even if you haveKeep Markdown Line Break Whitespace
enabled.Prerequisites
Description
Whitespace is stripping trailing whitespaces in markdown files despited the settings.
Edit by @rsese: not reproducible in safe mode because it reproduces when you install and use https://atom.io/packages/language-markdown
Steps to Reproduce
Expected behavior: The whitespace at the end of the line are ignored and and not deleted.
Actual behavior: The whitespaces are deleted. (The trailing whitespaces in the current line are ignored.) If the option "Remove Trailing Whitespace" or the package Whitespace is deactivated, the whitespaces remain.
Reproduces how often: 100.0000000%
Versions
Atom : 1.33.0
Electron: 2.0.11
Chrome : 61.0.3163.100
Node : 8.9.3
Whitespace: 0.37.7
OS: Mac OS Mohave 10.14.1
Additional Information
I can not reproduce the issue running Atom on Debian (Bunsen Labs).
The text was updated successfully, but these errors were encountered: