Add line type class to diff line num cells
This commit is contained in:
parent
38b69557e8
commit
f95838800f
2 changed files with 8 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue