- if @lines.present?
  - line_class = diff_view == :inline ? '' : diff_view
  - if @form.unfold? && @form.since != 1 && !@form.bottom?
    %tr.line_holder{ class: line_class }
      = diff_match_line @form.since, @form.since, text: @match_line, view: diff_view

  - @lines.each_with_index do |line, index|
    - line_new = index + @form.since
    - line_old = line_new - @form.offset
    - line_content = capture do
      %td.line_content.noteable_line{ class: line_class }==#{' ' * @form.indent}#{line}
    %tr.line_holder{ id: line_old, class: line_class }
      - case diff_view
      - when :inline
        %td.old_line.diff-line-num{ data: { linenumber: line_old } }
          %a{ href: "##{line_old}", data: { linenumber: line_old } }
        %td.new_line.diff-line-num{ data: { linenumber: line_new } }
          %a{ href: "##{line_new}", data: { linenumber: line_new } }
        = line_content
      - when :parallel
        %td.old_line.diff-line-num{ data: { linenumber: line_old } }
          %a{ href: "##{line_old}", data: { linenumber: line_old } }
        = line_content
        %td.new_line.diff-line-num{ data: { linenumber: line_new } }
          %a{ href: "##{line_new}", data: { linenumber: line_new } }
        = line_content

  - if @form.unfold? && @form.bottom? && @form.to < @blob.lines.size
    %tr.line_holder{ id: @form.to, class: line_class }
      = diff_match_line @form.to - @form.offset, @form.to, text: @match_line, view: diff_view, bottom: true
