Add syntax highlighting to suggestion diff

This commit is contained in:
Annabel Dunstone Gray 2019-01-10 09:54:39 +00:00 committed by Phil Hughes
parent 33d69aaeee
commit 7e802feefa
3 changed files with 8 additions and 3 deletions

View File

@ -50,7 +50,7 @@ export default {
:help-page-path="helpPagePath"
@apply="applySuggestion"
/>
<table class="mb-3 md-suggestion-diff">
<table class="mb-3 md-suggestion-diff js-syntax-highlight code">
<tbody>
<!-- Old Line -->
<tr class="line_holder old">

View File

@ -0,0 +1,5 @@
---
title: Add syntax highlighting to suggestion diff
merge_request: 24156
author:
type: fixed

View File

@ -34,8 +34,8 @@ describe('Suggestion Diff component', () => {
expect(vm.$el.querySelector('.qa-suggestion-diff-header')).not.toBeNull();
});
it('renders a diff table', () => {
expect(vm.$el.querySelector('table.md-suggestion-diff')).not.toBeNull();
it('renders a diff table with syntax highlighting', () => {
expect(vm.$el.querySelector('.md-suggestion-diff.js-syntax-highlight.code')).not.toBeNull();
});
it('renders the oldLineNumber', () => {