[Nitro] superflous spaces and random windows linefeeds in the source

George Moschovitis george.moschovitis at gmail.com
Wed Nov 2 10:29:04 EST 2005

Hello Rob,

I totaly agree with you. Saddly I am forced to use a windows machine
(I cannot believe that people use this user-unfriendly OS) at the
moment and I have recorded some patches before aplying my code cleanup
fix. Will try to be more careful in the future.


On 11/2/05, Rob Pitt <rob at motionpath.com> wrote:
> A request to the devs, can we not have any windows linefeeds in nitro
> code? AFAIK they are unnecessary and when we edit files with macs, linux
> or bsd systems our text editors remove them when we change lines and
> cause a lot of problems trying to generate darcs patches. There are many
> powerful text editors for windows that do not require these spaces, my
> favorite being UltraEdit32. Here is a little script that will kill
> windows linefeeds and superflous spaces on the end of lines out of a file:
> #!/usr/bin/env ruby
> f=File.open(ARGV[0],"r")
> new_lines = Array.new
> begin
>         f.readlines.each do |line|
>                 new_lines << line.gsub(/ +$/,"").delete(13.chr)
>         end
> ensure
>         f.close
> end
> f=File.open(ARGV[0],"w")
> f.write new_lines
> f.close
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general


More information about the Nitro-general mailing list