]> Untitled Git - lemmy-ui.git/commitdiff
Using utf-8 emojis. Fixes #184
authorDessalines <tyhou13@gmx.com>
Sun, 21 Feb 2021 21:22:53 +0000 (16:22 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 21 Feb 2021 21:22:53 +0000 (16:22 -0500)
package.json
src/shared/utils.ts
yarn.lock

index 8f35d4bf300663bc482e583cb5911cd0a6abe217..4b3426f275c08d89ef8c9e8e60152e3940fa7185 100644 (file)
@@ -32,7 +32,6 @@
     "jwt-decode": "^3.1.2",
     "markdown-it": "^12.0.4",
     "markdown-it-container": "^3.0.0",
-    "markdown-it-emoji": "^2.0.0",
     "markdown-it-sub": "^1.0.0",
     "markdown-it-sup": "^1.0.0",
     "moment": "^2.29.1",
index 016862f4a7f4191018dcbb45d88b070149d38cb0..febb4729461d67048ea30c221314baaea37c0c37 100644 (file)
@@ -61,7 +61,6 @@ if (isBrowser()) {
 import markdown_it from 'markdown-it';
 import markdown_it_sub from 'markdown-it-sub';
 import markdown_it_sup from 'markdown-it-sup';
-import markdownitEmoji from 'markdown-it-emoji/light';
 import markdown_it_container from 'markdown-it-container';
 import emojiShortName from 'emoji-short-name';
 import Toastify from 'toastify-js';
@@ -201,9 +200,6 @@ export const md = new markdown_it({
         return '</details>\n';
       }
     },
-  })
-  .use(markdownitEmoji, {
-    defs: objectFlip(emojiShortName),
   });
 
 export function hotRankComment(comment_view: CommentView): number {
@@ -661,7 +657,7 @@ export function setupTribute() {
           return `${item.original.val} ${shortName}`;
         },
         selectTemplate: (item: any) => {
-          return `:${item.original.key}:`;
+          return `${item.original.val}`;
         },
         values: Object.entries(emojiShortName).map(e => {
           return { key: e[1], val: e[0] };
index 6628f67b0fa40e5b183ff474a73e8abd108ddda9..f698b36cd9a7ede527d6baf237c93f92865cf291 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -5974,11 +5974,6 @@ markdown-it-container@^3.0.0:
   resolved "https://registry.yarnpkg.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz#1d19b06040a020f9a827577bb7dbf67aa5de9a5b"
   integrity sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==
 
-markdown-it-emoji@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.0.tgz#3164ad4c009efd946e98274f7562ad611089a231"
-  integrity sha512-39j7/9vP/CPCKbEI44oV8yoPJTpvfeReTn/COgRhSpNrjWF3PfP/JUxxB0hxV6ynOY8KH8Y8aX9NMDdo6z+6YQ==
-
 markdown-it-sub@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8"