From 99e74e8eb2de988c8602e6e1311e689533957380 Mon Sep 17 00:00:00 2001 From: Jasmine Tai <45131430+j-tai@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:20:01 -0800 Subject: [PATCH] feat: upgrade markdown-it-emoji to 3.0.0 (#6945) --- client/components/editor/editor-markdown.vue | 2 +- package.json | 2 +- server/modules/comments/default/comment.js | 2 +- server/modules/rendering/markdown-emoji/renderer.js | 2 +- yarn.lock | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/components/editor/editor-markdown.vue b/client/components/editor/editor-markdown.vue index 04b5c6aa..4ca6e192 100644 --- a/client/components/editor/editor-markdown.vue +++ b/client/components/editor/editor-markdown.vue @@ -200,7 +200,7 @@ import 'codemirror/addon/fold/foldgutter.css' import MarkdownIt from 'markdown-it' import mdAttrs from 'markdown-it-attrs' import mdDecorate from 'markdown-it-decorate' -import mdEmoji from 'markdown-it-emoji' +import { full as mdEmoji } from 'markdown-it-emoji' import mdTaskLists from 'markdown-it-task-lists' import mdExpandTabs from 'markdown-it-expand-tabs' import mdAbbr from 'markdown-it-abbr' diff --git a/package.json b/package.json index e78c91b1..d6723534 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "markdown-it-abbr": "1.0.4", "markdown-it-attrs": "3.0.3", "markdown-it-decorate": "1.2.2", - "markdown-it-emoji": "1.4.0", + "markdown-it-emoji": "3.0.0", "markdown-it-expand-tabs": "1.0.13", "markdown-it-external-links": "0.0.6", "markdown-it-footnote": "3.0.3", diff --git a/server/modules/comments/default/comment.js b/server/modules/comments/default/comment.js index fa819c8b..10948f3e 100644 --- a/server/modules/comments/default/comment.js +++ b/server/modules/comments/default/comment.js @@ -1,5 +1,5 @@ const md = require('markdown-it') -const mdEmoji = require('markdown-it-emoji') +const { full: mdEmoji } = require('markdown-it-emoji') const { JSDOM } = require('jsdom') const createDOMPurify = require('dompurify') const _ = require('lodash') diff --git a/server/modules/rendering/markdown-emoji/renderer.js b/server/modules/rendering/markdown-emoji/renderer.js index 331b97ef..0c7e7407 100644 --- a/server/modules/rendering/markdown-emoji/renderer.js +++ b/server/modules/rendering/markdown-emoji/renderer.js @@ -1,4 +1,4 @@ -const mdEmoji = require('markdown-it-emoji') +const { full: mdEmoji } = require('markdown-it-emoji') const twemoji = require('twemoji') // ------------------------------------ diff --git a/yarn.lock b/yarn.lock index d7003475..6ac6a6f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13146,10 +13146,10 @@ markdown-it-decorate@1.2.2: resolved "https://registry.yarnpkg.com/markdown-it-decorate/-/markdown-it-decorate-1.2.2.tgz#f1e11d11d837ae78906198f8a2c974f0e646acb7" integrity sha512-7BFWJ97KBXgkaPVjKHISQnhSW8RWQ7yRNXpr8pPUV2Rw4GHvGrgb6CelKCM+GSijP0uSLCAVfc/knWIz+2v/Sw== -markdown-it-emoji@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz#9bee0e9a990a963ba96df6980c4fddb05dfb4dcc" - integrity sha512-QCz3Hkd+r5gDYtS2xsFXmBYrgw6KuWcJZLCEkdfAuwzZbShCmCfta+hwAMq4NX/4xPzkSHduMKgMkkPUJxSXNg== +markdown-it-emoji@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-3.0.0.tgz#8475a04d671d7c93f931b76fb90c582768b7f0b5" + integrity sha512-+rUD93bXHubA4arpEZO3q80so0qgoFJEKRkRbjKX8RTdca89v2kfyF+xR3i2sQTwql9tpPZPOQN5B+PunspXRg== markdown-it-expand-tabs@1.0.13: version "1.0.13"