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({ ...@@ -225,7 +225,7 @@ export function insertMarkdownText({
} else if (tag.indexOf(textPlaceholder) > -1) { } else if (tag.indexOf(textPlaceholder) > -1) {
textToInsert = tag.replace(textPlaceholder, selected); textToInsert = tag.replace(textPlaceholder, selected);
} else { } else {
textToInsert = String(startChar) + tag + selected + (wrap ? tag : ' '); textToInsert = String(startChar) + tag + selected + (wrap ? tag : '');
} }
if (removedFirstNewLine) { if (removedFirstNewLine) {
......
---
title: Remove extra spaces from markdown toolbar items
merge_request: 31288
author:
type: other
...@@ -25,7 +25,7 @@ describe('init markdown', () => { ...@@ -25,7 +25,7 @@ describe('init markdown', () => {
insertMarkdownText({ insertMarkdownText({
textArea, textArea,
text: textArea.value, text: textArea.value,
tag: '*', tag: '* ',
blockTag: null, blockTag: null,
selected: '', selected: '',
wrap: false, wrap: false,
...@@ -43,7 +43,7 @@ describe('init markdown', () => { ...@@ -43,7 +43,7 @@ describe('init markdown', () => {
insertMarkdownText({ insertMarkdownText({
textArea, textArea,
text: textArea.value, text: textArea.value,
tag: '*', tag: '* ',
blockTag: null, blockTag: null,
selected: '', selected: '',
wrap: false, wrap: false,
...@@ -61,7 +61,7 @@ describe('init markdown', () => { ...@@ -61,7 +61,7 @@ describe('init markdown', () => {
insertMarkdownText({ insertMarkdownText({
textArea, textArea,
text: textArea.value, text: textArea.value,
tag: '*', tag: '* ',
blockTag: null, blockTag: null,
selected: '', selected: '',
wrap: false, wrap: false,
...@@ -79,7 +79,7 @@ describe('init markdown', () => { ...@@ -79,7 +79,7 @@ describe('init markdown', () => {
insertMarkdownText({ insertMarkdownText({
textArea, textArea,
text: textArea.value, text: textArea.value,
tag: '*', tag: '* ',
blockTag: null, blockTag: null,
selected: '', selected: '',
wrap: false, wrap: false,
......
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