diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 0da3c18f..e384b745 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -10,6 +10,11 @@ import HashtagLink from 'src/components/hashtag_link/hashtag_link.vue' import './rich_content.scss' +const selectContent = (html, sourceContent, mfm) => { + if (!mfm) return html + return sourceContent === '' ? html : sourceContent +} + /** * RichContent, The Über-powered component for rendering Post HTML. * @@ -79,7 +84,7 @@ export default { const greentext = this.mfm ? false : this.greentext // Pre-process HTML - const useContent = this.sourceContent === '' ? this.html : this.sourceContent + const useContent = selectContent(this.html, this.sourceContent, this.mfm) const { newHtml: html } = preProcessPerLine(useContent, greentext) let currentMentions = null // Current chain of mentions, we group all mentions together // This is used to recover spacing removed when parsing mentions