A platform for community discussion. Free, open, simple.
DEV: Remove old link building code. (#16121)
Roman Rizzi136f7dbf78c1
diff --git a/app/serializers/reviewable_score_serializer.rb b/app/serializers/reviewable_score_serializer.rbindex a16bd752c83..549bd4536a5 100644--- a/app/serializers/reviewable_score_serializer.rb+++ b/app/serializers/reviewable_score_serializer.rb@@ -40,12 +40,6 @@ class ReviewableScoreSerializer < ApplicationSerializertext = I18n.t("reviewables.reasons.#{object.reason}", link: link, default: nil)elsetext = I18n.t("reviewables.reasons.#{object.reason}", default: nil)-- # TODO(roman): Remove after the 2.8 release.- # The discourse-antivirus and akismet plugins still use the backtick format for settings.- # It'll be hard to migrate them to the new format without breaking backwards compatibility, so I'm keeping the old behavior for now.- # Will remove after the 2.8 release.- linkify_backticks(object.reason, text) if textendtext@@ -86,15 +80,4 @@ class ReviewableScoreSerializer < ApplicationSerializer"<a href=\"#{url_for(reason, text)}\">#{text.gsub('_', ' ')}</a>"end-- def linkify_backticks(reason, text)- text.gsub!(/`[a-z_]+`/) do |m|- if scope.is_staff?- setting = m[1..-2]- "<a href=\"#{url_for(reason, setting)}\">#{setting.gsub('_', ' ')}</a>"- else- m.gsub('_', ' ')- end- end- endend