defunkt / coffee-mode

Emacs Major Mode for CoffeeScript
http://ozmm.org/posts/coffee_mode.html
574 stars 147 forks source link

delete-trailing-whitespace removes code when there are four # on a line. #354

Closed arkarkark closed 8 years ago

arkarkark commented 8 years ago
y = ->

  x = 1 #### NOTE

If you have that in a coffeescript buffer and call delete-trailing-whitespace then you end up with

y = ->

# NOTE

NOTE: there are two spaces at the start of each of those empty looking lines. here is the code with the spaces replaced with _

y = ->
__ 
__ 
  x = 1 #### NOTE

This seems related to there being 3 or more # next to each other. The try coffeescript on coffeescript.org indicates that it's valid coffeescript.

syohex commented 8 years ago

I cannot reproduce this issue.

coffee-delete-spaces

Could you tell us in more detail ?

arkarkark commented 8 years ago

Thanks so much @syohex for the quick reply.

I was running a 25.0.xx something on OSX 10.11.5 (El Cap) from a brew install emacs --HEAD. I just rebuilt the latest to 25.1.50.1 and it seems to be fixed now.

I think it was more than likely this issue https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23684