diff --git a/src/components/NcRichText/NcRichText.vue b/src/components/NcRichText/NcRichText.vue index fd7e53e517..0b5c9079d3 100644 --- a/src/components/NcRichText/NcRichText.vue +++ b/src/components/NcRichText/NcRichText.vue @@ -218,8 +218,10 @@ export default { prefix: false, }) .processSync(this.useMarkdown + // In order to correctly show newlines in Markdown, + // each newline contains a non-breaking space ? this.text.slice().replace(/\n{2,}/g, (match) => { - return '\n\u00A0'.repeat(match.length - 1) + '\n' + return '\n' + '\n\u00A0\n'.repeat(match.length - 1) }) : this.text) .result