Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-12 20:42:40 +0300
committermicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-12 20:42:40 +0300
commit46e4e8f4dc968b7173aa37bb3e3bb944e5d63e10 (patch)
tree5878e37f3f1e292f170d94e37ad49c1edd04adc1 /lib/gitlab/diff
parenta91101d0ac19e33b0f26acaa4c2f1207789641fb (diff)
changed InlineDiffMarker to make it html_safe its output
updated the spec
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/inline_diff_marker.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/diff/inline_diff_marker.rb b/lib/gitlab/diff/inline_diff_marker.rb
index 919965100ae..010b4be7b40 100644
--- a/lib/gitlab/diff/inline_diff_marker.rb
+++ b/lib/gitlab/diff/inline_diff_marker.rb
@@ -2,9 +2,10 @@ module Gitlab
module Diff
class InlineDiffMarker < Gitlab::StringRangeMarker
def mark(line_inline_diffs, mode: nil)
- super(line_inline_diffs) do |text, left:, right:|
+ mark = super(line_inline_diffs) do |text, left:, right:|
%{<span class="#{html_class_names(left, right, mode)}">#{text}</span>}
end
+ mark.html_safe
end
private