From 91dd4f847adb4b9a9bbdd3f377a422d40b4b243f Mon Sep 17 00:00:00 2001 From: Robin Wellner Date: Thu, 30 Jun 2011 14:27:39 +0200 Subject: [PATCH] =?UTF-8?q?Adds=20support=20for=20converting=20<->=20to=20?= =?UTF-8?q?=E2=86=94=20in=20markdownify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/markdownify_helper.rb | 1 + spec/helpers/markdownify_helper_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/markdownify_helper.rb b/app/helpers/markdownify_helper.rb index 3eb8783fa..5d82f33a6 100644 --- a/app/helpers/markdownify_helper.rb +++ b/app/helpers/markdownify_helper.rb @@ -118,6 +118,7 @@ module MarkdownifyHelper ":-(" => "☹", ":)" => "☺", ":-)" => "☺", + "<->" => "↔", "->" => "→", "<-" => "←", "..." => "…", diff --git a/spec/helpers/markdownify_helper_spec.rb b/spec/helpers/markdownify_helper_spec.rb index 7bfb4b3b8..b9feb7fd0 100644 --- a/spec/helpers/markdownify_helper_spec.rb +++ b/spec/helpers/markdownify_helper_spec.rb @@ -157,8 +157,8 @@ describe MarkdownifyHelper do end it "replaces various things with (their) HTML entities" do - message = ":) :-) :( :-( ... -> <- (tm) (r) (c)" - markdownify(message).should == "☺ ☺ ☹ ☹ … → ← ™ ® ©" + message = ":) :-) :( :-( ... <-> -> <- (tm) (r) (c)" + markdownify(message).should == "☺ ☺ ☹ ☹ … ↔ → ← ™ ® ©" end it "skips doing it if you say so" do