Add a comment why this is done.

This commit is contained in:
Marin Jankovski 2014-10-10 08:32:05 +02:00
parent 1d14676e0c
commit fc2adfb6e4
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,12 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
super options
end
# If project has issue number 39, apostrophe will be linked in
# regular text to the issue as Redcarpet will convert apostrophe to
# #39;
# We replace apostrophe with right single quote before Redcarpet
# does the processing and put the apostrophe back in postprocessing.
# This only influences regular text, code blocks are untouched.
def normal_text(text)
return text unless text.present?
text.gsub("'", "&rsquo;")