summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-10-10 08:24:58 +0200
committerMarin Jankovski <maxlazio@gmail.com>2014-10-10 08:24:58 +0200
commit1d14676e0ce0db006058e02aa0ceedf9c05e5625 (patch)
tree4f98d46f5506c1be24f5b61c57feb0ee869fece7
parenta912308340ec70f13de98ae5116a8d71929a995f (diff)
downloadgitlab-ce-1d14676e0ce0db006058e02aa0ceedf9c05e5625.tar.gz
Substitute right single quote back with apostrophe.
-rw-r--r--lib/redcarpet/render/gitlab_html.rb1
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb4
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!("&rsquo;", "'")
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 <a.+>@#{member.user.username}<\/a>’s task/
+ expected = /Yes, it is <a.+>@#{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 ==
- "<p>Don’t use <code>$#{snippet.id}</code> here.</p>\n"
+ "<p>Don't use <code>$#{snippet.id}</code> here.</p>\n"
end
it "should leave ref-like autolinks untouched" do