diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-08 15:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-08 15:08:31 +0300 |
commit | 2f5c5b1081fe544ecb9a71d8adf88e00f01f3732 (patch) | |
tree | b3c8a9358d2384ab10d7a448756f8c54b376215b /app/helpers/snippets_helper.rb | |
parent | 33882b0ed118afb7239b76a074f9ab7cf90558f3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r-- | app/helpers/snippets_helper.rb | 25 |
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) |