use standard misskey content unless asked not to
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
FloatingGhost 2022-08-17 09:51:17 +01:00
parent 597de32e12
commit 86813e1136

View file

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