Skip to content

Commit

Permalink
Desktop: Resolves #10315: Do not trim markdown upon saving in rich te…
Browse files Browse the repository at this point in the history
…xt (#10321)
  • Loading branch information
chaNcharge committed Apr 17, 2024
1 parent 39db5cd commit 74cda4e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -95,7 +95,7 @@ export default function openEditDialog(editor: any, markupToHtml: any, dispatchD
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
onSubmit: async (dialogApi: any) => {
const newSource = newBlockSource(dialogApi.getData().languageInput, dialogApi.getData().codeTextArea, source);
const md = `${newSource.openCharacters}${newSource.content.trim()}${newSource.closeCharacters}`;
const md = `${newSource.openCharacters}${newSource.content}${newSource.closeCharacters}`;
const result = await markupToHtml.current(MarkupToHtml.MARKUP_LANGUAGE_MARKDOWN, md, { bodyOnly: true });

// markupToHtml will return the complete editable HTML, but we only
Expand Down

0 comments on commit 74cda4e

Please sign in to comment.