lib/copy/server.rb in copy-0.1.2 vs lib/copy/server.rb in copy-0.1.3

- old
+ new

@@ -64,10 +64,10 @@ # Determine how much white space it has in front. white_space = first_line.match(/^(\s)*/)[0] # Remove that same amount of white space from the beginning of every line. content.gsub!(Regexp.new("^#{white_space}"), '') # Remove all whitespace from the end, but keep the newline if present. - content.gsub!(/\s*$/, '') << "\n" if content =~ /\n/ + content.gsub!(/\s*\z/, '') << "\n" if content =~ /\n/ # Save the content so it can be edited. Copy::Storage.set(name, content) if Copy::Storage.connected? end \ No newline at end of file