Skip to content

Commit

Permalink
only strip space from the very end
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed May 21, 2011
1 parent 88e00f4 commit e149b83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/copy/server.rb
Expand Up @@ -66,7 +66,7 @@ def copy(name, options = {}, &block)
# 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?
Expand Down
2 changes: 1 addition & 1 deletion lib/copy/version.rb
@@ -1,3 +1,3 @@
module Copy
VERSION = '0.1.2'
VERSION = '0.1.3'
end

0 comments on commit e149b83

Please sign in to comment.