From 77bae90d0e1fa179d6ee493aea17679e9626a241 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Wed, 4 May 2011 15:28:42 +0200 Subject: [PATCH] moar mappings for process_emoticons --- app/helpers/application_helper.rb | 5 ++++- spec/helpers/application_helper_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index be469ff32..76547b8c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -284,7 +284,10 @@ module ApplicationHelper ":-)" => "☺", "->" => "→", "<-" => "←", - "..." => "…" + "..." => "…", + "(tm)" => "™", + "(r)" => "®", + "(c)" => "©" } map.each do |search, replace| diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index d86e64e00..e7433a9e9 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -168,8 +168,8 @@ describe ApplicationHelper do end it "replaces various things with (their) HTML entities" do - message = ":) :-) :( :-( ... -> <-" - markdownify(message).should == "☺ ☺ ☹ ☹ … → ←" + message = ":) :-) :( :-( ... -> <- (tm) (r) (c)" + markdownify(message).should == "☺ ☺ ☹ ☹ … → ← ™ ® ©" end it "skips doing it if you say so" do