Commit db48b8c3 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 772911ad 4dcbee4d
......@@ -7,6 +7,8 @@ import { GlSkeletonLoading } from '@gitlab/ui';
import { getDiffMode } from '~/diffs/store/utils';
import { diffViewerModes } from '~/ide/constants';
const FIRST_CHAR_REGEX = /^(\+|-| )/;
export default {
components: {
DiffFileHeader,
......@@ -59,6 +61,9 @@ export default {
this.error = true;
});
},
trimChar(line) {
return line.replace(FIRST_CHAR_REGEX, '');
},
},
userColorSchemeClass: window.gon.user_color_scheme,
};
......@@ -83,7 +88,7 @@ export default {
>
<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>
<td :class="line.type" class="line_content" v-html="trimChar(line.rich_text)"></td>
</tr>
</template>
<tr v-if="!hasTruncatedDiffLines" class="line_holder line-holder-placeholder">
......
---
title: Remove duplicate trailing +/- char in merge request discussions
merge_request: 29518
author:
type: fixed
---
title: Disallow `NULL` values for `geo_nodes.primary` column
merge_request: 29818
author: Arun Kumar Mohan
type: other
---
title: Backport and Docs for Paginate license management and add license search
merge_request: 27602
author:
type: changed
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class UpdateGeoNodesPrimary < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
change_column_default(:geo_nodes, :primary, false)
change_column_null(:geo_nodes, :primary, false, false)
end
def down
change_column_default(:geo_nodes, :primary, nil)
change_column_null(:geo_nodes, :primary, true)
end
end
......@@ -1391,7 +1391,7 @@ ActiveRecord::Schema.define(version: 20190619175843) do
end
create_table "geo_nodes", id: :serial, force: :cascade do |t|
t.boolean "primary"
t.boolean "primary", default: false, null: false
t.integer "oauth_application_id"
t.boolean "enabled", default: true, null: false
t.string "access_key"
......
......@@ -47,6 +47,19 @@ describe('diff_with_note', () => {
vm = mountComponentWithStore(Component, { props, store });
});
it('removes trailing "+" char', () => {
const richText = vm.$el.querySelectorAll('.line_holder')[4].querySelector('.line_content')
.textContent[0];
expect(richText).not.toEqual('+');
});
it('removes trailing "-" char', () => {
const richText = vm.$el.querySelector('#LC13').parentNode.textContent[0];
expect(richText).not.toEqual('-');
});
it('shows text diff', () => {
expect(selectors.container).toHaveClass('text-file');
expect(selectors.diffTable).toExist();
......
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