From 9b49f7a21e2db91a80a4465e179dfbc872cbfd66 Mon Sep 17 00:00:00 2001 From: sfr <sol@solfisher.com> Date: Fri, 15 Jul 2022 09:57:17 +0000 Subject: [PATCH] Use Marked and marked-mfm for MFM rendering (#29) Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/29 Co-authored-by: sfr <sol@solfisher.com> Co-committed-by: sfr <sol@solfisher.com> --- src/components/rich_content/rich_content.jsx | 4 +++- static/mfm.css | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 0d4127b6..a4b197b5 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -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) diff --git a/static/mfm.css b/static/mfm.css index ae60eb23..aa76c5b9 100644 --- a/static/mfm.css +++ b/static/mfm.css @@ -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] {