1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Resolves #10315: Do not trim markdown upon saving in rich text (#10321)

This commit is contained in:
chaNcharge 2024-04-17 02:19:25 -07:00 committed by GitHub
parent 39db5cd061
commit 74cda4e2ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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