From f17f89da8f026604ac4ebead5faf7f528054a979 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 28 Feb 2024 22:55:39 +0200 Subject: [PATCH] add comments for future self --- files/assets/js/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index 0cfd01592..703d41bf5 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -209,8 +209,8 @@ function markdown(t) { // patted emojis cannot be flipped back easily so they don't support double flipping const lovedClass = modifiers.has(MODIFIERS.LOVE) ? 'love-preview' : ''; - let alt = old.replace(/\w/g,''); - if (old.endsWith('genocide:')) + let alt = old.replace(/\w/g,''); //necessary to prevent duplicate emojis getting fucked + if (old.endsWith('genocide:')) //necessary to make the preview of mirrored genocide like the backend alt = alt.slice(0, -1) + 'genocide:' if ([MODIFIERS.TALKING, MODIFIERS.GENOCIDE, MODIFIERS.PAT, MODIFIERS.LOVE, MODIFIERS.TYPING].some((modifer) => modifiers.has(modifer))) {