Commit f2bd5af6 authored by Marcel Amirault's avatar Marcel Amirault Committed by Nathan Friend

Remove spaces from markdown toolbar items

parent 071e8dac
...@@ -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,
......
...@@ -185,7 +185,7 @@ describe('Markdown field component', () => { ...@@ -185,7 +185,7 @@ describe('Markdown field component', () => {
markdownButton.trigger('click'); markdownButton.trigger('click');
return wrapper.vm.$nextTick(() => { 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