summaryrefslogtreecommitdiff
path: root/app/helpers/snippets_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/helpers/snippets_helper.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r--app/helpers/snippets_helper.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb
index 94c46feb8ae..1be7e240c1a 100644
--- a/app/helpers/snippets_helper.rb
+++ b/app/helpers/snippets_helper.rb
@@ -32,31 +32,6 @@ module SnippetsHelper
end
end
- # Get an array of line numbers surrounding a matching
- # line, bounded by min/max.
- #
- # @returns Array of line numbers
- def bounded_line_numbers(line, min, max, surrounding_lines)
- lower = line - surrounding_lines > min ? line - surrounding_lines : min
- upper = line + surrounding_lines < max ? line + surrounding_lines : max
- (lower..upper).to_a
- end
-
- def snippet_embed_tag(snippet)
- content_tag(:script, nil, src: gitlab_snippet_url(snippet, format: :js))
- end
-
- def snippet_embed_input(snippet)
- content_tag(:input,
- nil,
- type: :text,
- readonly: true,
- class: 'js-snippet-url-area snippet-embed-input form-control',
- data: { url: gitlab_snippet_url(snippet) },
- value: snippet_embed_tag(snippet),
- autocomplete: 'off')
- end
-
def snippet_badge(snippet)
return unless attrs = snippet_badge_attributes(snippet)