Commit f9583880 authored by Douwe Maan's avatar Douwe Maan

Add line type class to diff line num cells

parent 38b69557
......@@ -81,8 +81,8 @@ export default {
:key="line.line_code"
class="line_holder"
>
<td class="diff-line-num old_line">{{ line.old_line }}</td>
<td class="diff-line-num new_line">{{ line.new_line }}</td>
<td :class="line.type" class="diff-line-num old_line">{{ line.old_line }}</td>
<td :class="line.type" class="diff-line-num new_line">{{ line.new_line }}</td>
<td :class="line.type" class="line_content" v-html="line.rich_text"></td>
</tr>
</template>
......
......@@ -7,14 +7,14 @@
- unless @diff_lines.empty?
%table.text-file.code.js-syntax-highlight
- @diff_lines.each do |line|
%tr.line_holder{ class: "#{line.type}" }
%tr.line_holder{ class: line.type }
- if line.type == "match"
%td.old_line.diff-line-num= "..."
%td.new_line.diff-line-num= "..."
%td.old_line.diff-line-num.match= "..."
%td.new_line.diff-line-num.match= "..."
%td.line_content.match= line.text
- else
%td.old_line.diff-line-num
%td.new_line.diff-line-num
%td.line_content{ class: "#{line.type}" }= diff_line_content(line.text)
%td.old_line.diff-line-num{ class: line.type }
%td.new_line.diff-line-num{ class: line.type }
%td.line_content{ class: line.type }= diff_line_content(line.text)
- else
.nothing-here-block No changes.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment