diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-26 12:14:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-26 12:14:20 +0300 |
commit | 30b1000678f33e5b8ae5b4dcbeb2ae5162a2cc5d (patch) | |
tree | 2929d8692104f816194e7462e21bcda2c91ed10e /app/assets/javascripts/diffs | |
parent | 4b198b6289b1643b6e2571c03a377fe08e6ab504 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r-- | app/assets/javascripts/diffs/components/diff_view.vue | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_view.vue b/app/assets/javascripts/diffs/components/diff_view.vue index 8562a1d44e7..333bf1b356c 100644 --- a/app/assets/javascripts/diffs/components/diff_view.vue +++ b/app/assets/javascripts/diffs/components/diff_view.vue @@ -153,21 +153,38 @@ export default { @mousedown="handleParallelLineMouseDown" > <template v-for="(line, index) in diffLines"> - <div - v-if="line.isMatchLineLeft || line.isMatchLineRight" - :key="`expand-${index}`" - class="diff-tr line_expansion match" - > - <div class="diff-td text-center gl-font-regular"> - <diff-expansion-cell - :file-hash="diffFile.file_hash" - :context-lines-path="diffFile.context_lines_path" - :line="line.left" - :is-top="index === 0" - :is-bottom="index + 1 === diffLinesLength" - /> + <template v-if="line.isMatchLineLeft || line.isMatchLineRight"> + <div :key="`expand-${index}`" class="diff-tr line_expansion match"> + <div class="diff-td text-center gl-font-regular"> + <diff-expansion-cell + :file-hash="diffFile.file_hash" + :context-lines-path="diffFile.context_lines_path" + :line="line.left" + :is-top="index === 0" + :is-bottom="index + 1 === diffLinesLength" + /> + </div> </div> - </div> + <div + v-if="line.left.rich_text" + :key="`expand-definition-${index}`" + class="diff-grid-row diff-tr line_holder match" + > + <div class="diff-grid-left diff-grid-3-col left-side"> + <div class="diff-td diff-line-num"></div> + <div v-if="inline" class="diff-td diff-line-num"></div> + <div class="diff-td line_content left-side gl-white-space-normal!"> + {{ line.left.rich_text }} + </div> + </div> + <div v-if="!inline" class="diff-grid-right diff-grid-3-col right-side"> + <div class="diff-td diff-line-num"></div> + <div class="diff-td line_content right-side gl-white-space-normal!"> + {{ line.left.rich_text }} + </div> + </div> + </div> + </template> <diff-row v-if="!line.isMatchLineLeft && !line.isMatchLineRight" :key="line.line_code" |