Substitute right single quote back with apostrophe.

This commit is contained in:
Marin Jankovski 2014-10-10 08:24:58 +02:00
parent a912308340
commit 1d14676e0c
2 changed files with 3 additions and 2 deletions

View file

@ -49,6 +49,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
end end
def postprocess(full_document) def postprocess(full_document)
full_document.gsub!("&rsquo;", "'")
unless @template.instance_variable_get("@project_wiki") || @project.nil? unless @template.instance_variable_get("@project_wiki") || @project.nil?
full_document = h.create_relative_links(full_document) full_document = h.create_relative_links(full_document)
end end

View file

@ -535,7 +535,7 @@ describe GitlabMarkdownHelper do
project.issues.stub(:where).with(iid: '39').and_return([issue]) project.issues.stub(:where).with(iid: '39').and_return([issue])
actual = "Yes, it is @#{member.user.username}'s task." 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) markdown(actual).should match(expected)
end end
@ -574,7 +574,7 @@ describe GitlabMarkdownHelper do
it "should leave inline code untouched" do it "should leave inline code untouched" do
markdown("\nDon't use `$#{snippet.id}` here.\n").should == markdown("\nDon't use `$#{snippet.id}` here.\n").should ==
"<p>Dont use <code>$#{snippet.id}</code> here.</p>\n" "<p>Don't use <code>$#{snippet.id}</code> here.</p>\n"
end end
it "should leave ref-like autolinks untouched" do it "should leave ref-like autolinks untouched" do