mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +00:00
Using utf-8 emojis. Fixes #184
This commit is contained in:
parent
03efa1d1a2
commit
55e0eb52ce
3 changed files with 1 additions and 11 deletions
|
@ -32,7 +32,6 @@
|
||||||
"jwt-decode": "^3.1.2",
|
"jwt-decode": "^3.1.2",
|
||||||
"markdown-it": "^12.0.4",
|
"markdown-it": "^12.0.4",
|
||||||
"markdown-it-container": "^3.0.0",
|
"markdown-it-container": "^3.0.0",
|
||||||
"markdown-it-emoji": "^2.0.0",
|
|
||||||
"markdown-it-sub": "^1.0.0",
|
"markdown-it-sub": "^1.0.0",
|
||||||
"markdown-it-sup": "^1.0.0",
|
"markdown-it-sup": "^1.0.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
|
|
|
@ -61,7 +61,6 @@ if (isBrowser()) {
|
||||||
import markdown_it from 'markdown-it';
|
import markdown_it from 'markdown-it';
|
||||||
import markdown_it_sub from 'markdown-it-sub';
|
import markdown_it_sub from 'markdown-it-sub';
|
||||||
import markdown_it_sup from 'markdown-it-sup';
|
import markdown_it_sup from 'markdown-it-sup';
|
||||||
import markdownitEmoji from 'markdown-it-emoji/light';
|
|
||||||
import markdown_it_container from 'markdown-it-container';
|
import markdown_it_container from 'markdown-it-container';
|
||||||
import emojiShortName from 'emoji-short-name';
|
import emojiShortName from 'emoji-short-name';
|
||||||
import Toastify from 'toastify-js';
|
import Toastify from 'toastify-js';
|
||||||
|
@ -201,9 +200,6 @@ export const md = new markdown_it({
|
||||||
return '</details>\n';
|
return '</details>\n';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
|
||||||
.use(markdownitEmoji, {
|
|
||||||
defs: objectFlip(emojiShortName),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export function hotRankComment(comment_view: CommentView): number {
|
export function hotRankComment(comment_view: CommentView): number {
|
||||||
|
@ -661,7 +657,7 @@ export function setupTribute() {
|
||||||
return `${item.original.val} ${shortName}`;
|
return `${item.original.val} ${shortName}`;
|
||||||
},
|
},
|
||||||
selectTemplate: (item: any) => {
|
selectTemplate: (item: any) => {
|
||||||
return `:${item.original.key}:`;
|
return `${item.original.val}`;
|
||||||
},
|
},
|
||||||
values: Object.entries(emojiShortName).map(e => {
|
values: Object.entries(emojiShortName).map(e => {
|
||||||
return { key: e[1], val: e[0] };
|
return { key: e[1], val: e[0] };
|
||||||
|
|
|
@ -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"
|
resolved "https://registry.yarnpkg.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz#1d19b06040a020f9a827577bb7dbf67aa5de9a5b"
|
||||||
integrity sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==
|
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:
|
markdown-it-sub@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8"
|
resolved "https://registry.yarnpkg.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8"
|
||||||
|
|
Loading…
Reference in a new issue