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 { ...@@ -81,8 +81,8 @@ export default {
:key="line.line_code" :key="line.line_code"
class="line_holder" class="line_holder"
> >
<td class="diff-line-num old_line">{{ line.old_line }}</td> <td :class="line.type" 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 new_line">{{ line.new_line }}</td>
<td :class="line.type" class="line_content" v-html="line.rich_text"></td> <td :class="line.type" class="line_content" v-html="line.rich_text"></td>
</tr> </tr>
</template> </template>
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
- unless @diff_lines.empty? - unless @diff_lines.empty?
%table.text-file.code.js-syntax-highlight %table.text-file.code.js-syntax-highlight
- @diff_lines.each do |line| - @diff_lines.each do |line|
%tr.line_holder{ class: "#{line.type}" } %tr.line_holder{ class: line.type }
- if line.type == "match" - if line.type == "match"
%td.old_line.diff-line-num= "..." %td.old_line.diff-line-num.match= "..."
%td.new_line.diff-line-num= "..." %td.new_line.diff-line-num.match= "..."
%td.line_content.match= line.text %td.line_content.match= line.text
- else - else
%td.old_line.diff-line-num %td.old_line.diff-line-num{ class: line.type }
%td.new_line.diff-line-num %td.new_line.diff-line-num{ class: line.type }
%td.line_content{ class: "#{line.type}" }= diff_line_content(line.text) %td.line_content{ class: line.type }= diff_line_content(line.text)
- else - else
.nothing-here-block No changes. .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