1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 06:34:22 +00:00

Support gemoji "short"codes

This commit is contained in:
Steffo 2022-07-27 01:58:51 +02:00
parent ef7ea8f38f
commit 3c74c3114b
Signed by: steffo
GPG key ID: 6965406171929D01
3 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import { Fragment, memo } from "react"
import { default as ReactMarkdown } from "react-markdown"
import { ReactMarkdownOptions } from "react-markdown/lib/react-markdown"
import { default as remarkGfm } from "remark-gfm"
import { default as remarkGemoji } from "remark-gemoji"
type FestaMarkdownRendererProps = Omit<ReactMarkdownOptions, "children"> & {
code: string,
@ -27,6 +28,7 @@ export const FestaMarkdownRenderer = memo(({ code, ...props }: FestaMarkdownRend
}}
remarkPlugins={[
remarkGfm,
remarkGemoji,
]}
>
{code}

View file

@ -29,6 +29,7 @@
"react-markdown": "^8.0.3",
"react-storage-hooks": "^4.0.1",
"react-telegram-login": "^1.1.2",
"remark-gemoji": "^7.0.1",
"remark-gfm": "^3.0.1",
"swr": "^1.3.0"
},

View file

@ -1066,6 +1066,11 @@ functions-have-names@^1.2.2:
resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
gemoji@^7.0.0:
version "7.1.0"
resolved "https://registry.npmjs.org/gemoji/-/gemoji-7.1.0.tgz#165403777681a9690d649aabd104da037bdd7739"
integrity sha512-wI0YWDIfQraQMDs0yXAVQiVBZeMm/rIYssf8LZlMDdssKF19YqJKOHkv4zvwtVQTBJ0LNmErv1S+DqlVUudz8g==
get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:
version "1.1.2"
resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598"
@ -2263,6 +2268,16 @@ regexpp@^3.2.0:
resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
remark-gemoji@^7.0.1:
version "7.0.1"
resolved "https://registry.npmjs.org/remark-gemoji/-/remark-gemoji-7.0.1.tgz#42488adb9a0731dc82cdcde45f8e7bd61d795303"
integrity sha512-vhjuntkvYxRgM4Um6L5N7B3SrNu3eX6jNqpqAywpAvSYPbmDPNL3I5E6zWm+KPCyh3OpKRc5OPnz7SifggzePw==
dependencies:
"@types/mdast" "^3.0.0"
gemoji "^7.0.0"
unified "^10.0.0"
unist-util-visit "^4.0.0"
remark-gfm@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz#0b180f095e3036545e9dddac0e8df3fa5cfee54f"