From 1d14676e0ce0db006058e02aa0ceedf9c05e5625 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 10 Oct 2014 08:24:58 +0200 Subject: Substitute right single quote back with apostrophe. --- lib/redcarpet/render/gitlab_html.rb | 1 + spec/helpers/gitlab_markdown_helper_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb index 53c5a1e09c0..511619631fd 100644 --- a/lib/redcarpet/render/gitlab_html.rb +++ b/lib/redcarpet/render/gitlab_html.rb @@ -49,6 +49,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML end def postprocess(full_document) + full_document.gsub!("’", "'") unless @template.instance_variable_get("@project_wiki") || @project.nil? full_document = h.create_relative_links(full_document) end diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 0784834924c..f5e68687b53 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -535,7 +535,7 @@ describe GitlabMarkdownHelper do project.issues.stub(:where).with(iid: '39').and_return([issue]) actual = "Yes, it is @#{member.user.username}'s task." - expected = /Yes, it is @#{member.user.username}<\/a>’s task/ + expected = /Yes, it is @#{member.user.username}<\/a>'s task/ markdown(actual).should match(expected) end @@ -574,7 +574,7 @@ describe GitlabMarkdownHelper do it "should leave inline code untouched" do markdown("\nDon't use `$#{snippet.id}` here.\n").should == - "

Don’t use $#{snippet.id} here.

\n" + "

Don't use $#{snippet.id} here.

\n" end it "should leave ref-like autolinks untouched" do -- cgit v1.2.1