diff options
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) |