Commit 955e605f authored by Nathan Friend's avatar Nathan Friend

Merge branch 'markdown-toolbar-spaces' into 'master'

Remove spaces from markdown toolbar items

Closes #216612

See merge request gitlab-org/gitlab!31288
parents 4798f373 f2bd5af6
......@@ -225,7 +225,7 @@ export function insertMarkdownText({
} else if (tag.indexOf(textPlaceholder) > -1) {
textToInsert = tag.replace(textPlaceholder, selected);
} else {
textToInsert = String(startChar) + tag + selected + (wrap ? tag : ' ');
textToInsert = String(startChar) + tag + selected + (wrap ? tag : '');
}
if (removedFirstNewLine) {
......
---
title: Remove extra spaces from markdown toolbar items
merge_request: 31288
author:
type: other
......@@ -25,7 +25,7 @@ describe('init markdown', () => {
insertMarkdownText({
textArea,
text: textArea.value,
tag: '*',
tag: '* ',
blockTag: null,
selected: '',
wrap: false,
......@@ -43,7 +43,7 @@ describe('init markdown', () => {
insertMarkdownText({
textArea,
text: textArea.value,
tag: '*',
tag: '* ',
blockTag: null,
selected: '',
wrap: false,
......@@ -61,7 +61,7 @@ describe('init markdown', () => {
insertMarkdownText({
textArea,
text: textArea.value,
tag: '*',
tag: '* ',
blockTag: null,
selected: '',
wrap: false,
......@@ -79,7 +79,7 @@ describe('init markdown', () => {
insertMarkdownText({
textArea,
text: textArea.value,
tag: '*',
tag: '* ',
blockTag: null,
selected: '',
wrap: false,
......
......@@ -185,7 +185,7 @@ describe('Markdown field component', () => {
markdownButton.trigger('click');
return wrapper.vm.$nextTick(() => {
expect(textarea.value).toContain('* testing');
expect(textarea.value).toContain('* testing');
});
});
......
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