mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
Allow people to capitalize a word when ninja-editing a post
This commit is contained in:
parent
9540112d32
commit
281a08a99f
@ -72,7 +72,7 @@ class Post < ActiveRecord::Base
|
||||
|
||||
def raw_hash
|
||||
return if raw.blank?
|
||||
Digest::SHA1.hexdigest(raw.gsub(/\s+/, "").downcase)
|
||||
Digest::SHA1.hexdigest(raw.gsub(/\s+/, ""))
|
||||
end
|
||||
|
||||
def reset_cooked
|
||||
|
@ -417,8 +417,8 @@ describe Post do
|
||||
post.raw_hash.should == post_with_body(" thisis ourt est postbody").raw_hash
|
||||
end
|
||||
|
||||
it "returns the same hash even with different text case" do
|
||||
post.raw_hash.should == post_with_body("THIS is OUR TEST post BODy").raw_hash
|
||||
it "returns a different value with different text case" do
|
||||
post.raw_hash.should_not == post_with_body("THIS is OUR TEST post BODy").raw_hash
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user