gkz / grasp

JavaScript structural search, replace, and refactor
http://graspjs.com
MIT License
1.28k stars 33 forks source link

Avoiding to remove end-of-lines #15

Closed ncrovatti closed 10 years ago

ncrovatti commented 10 years ago

Hello,

First, thanks for providing such a needed tool for javascript. I greatly appreciate it!

While using grasp to refactor some code, I noticed that it removes the carriage returns a the end of files that are otherwise untouched by the refactoring.

I find it very obtrusive as it modifies source controlled files with unwanted or at least, unexpected changes.

So, I'm submitting this pull request for you to review and discuss!

Note: I left tests untouched as they weren't running at the time I made the PR.

Thanks for your answer!

gkz commented 10 years ago

I definitely understand and agree! It shouldn't be changing something that you don't expect it to change. Looking at the code, obviously it was put there for a reason, I don't remember exactly why though so I'll have to investigate before I remove it. What OS are you on by the way?

ncrovatti commented 10 years ago

Hey George, thanks for your fast reply!

I would be definitely interested to know about the original motivation behind this instruction.

Anyway I'm running on OSX.

ncrovatti commented 10 years ago

Hello George,

by any chance did you had time to check that issue deeper ?

Thanks!

gkz commented 10 years ago

I've been fixing various bugs, and this is the last one on my list before 0.2.1. I have a cold right now though, so I probably won't get to it until I feel a bit better.