Use Marked and marked-mfm for MFM rendering (#29)

Reviewed-on: AkkomaGang/pleroma-fe#29
Co-authored-by: sfr <sol@solfisher.com>
Co-committed-by: sfr <sol@solfisher.com>
This commit is contained in:
sfr 2022-07-15 09:57:17 +00:00 committed by Beefox
parent 39b6b0b49f
commit 8344f54fa1
2 changed files with 5 additions and 3 deletions

View File

@ -71,7 +71,9 @@ export default {
// NEVER EVER TOUCH DATA INSIDE RENDER
render () {
// Don't greentext MFM
const greentext = this.mfm ? false : this.greentext
if (this.mfm) {
this.greentext = false
}
// Pre-process HTML
const { newHtml: html } = preProcessPerLine(this.html, greentext)

View File

@ -23,10 +23,10 @@
animation: mfm-spin 0.5s linear infinite;
}
._mfm_spin_[data-x] {
._mfm_spin_[x] {
animation-name: mfm-spinX;
}
._mfm_spin_[data-y] {
._mfm_spin_[y] {
animation-name: mfm-spinY;
}
._mfm_spin_[left] {