Skip to content

Commit

Permalink
Solve the marked warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassa-hue committed Aug 10, 2023
1 parent 1e30e07 commit 4223647
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import React from 'react';
import PropTypes from 'prop-types';

import { marked } from 'marked';
import { gfmHeadingId } from 'marked-gfm-heading-id';
import { mangle } from 'marked-mangle';
import sanitizeHtml from 'sanitize-html';
import css from './Comment.module.scss';

marked.use(gfmHeadingId());
marked.use(mangle());

const Comment = React.forwardRef((props, ref) => {
const { author, text } = props;
const rawMarkup = marked(text, { gfm: true });
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"loader-utils": "^1.1.0",
"lodash": "^4.17.4",
"marked": "^5.1.0",
"marked-gfm-heading-id": "^3.0.4",
"marked-gfm-heading-id": "^3.0.5",
"marked-mangle": "^1.1.0",
"node-sass": "^9.0.0",
"node-uuid": "^1.4.8",
"postcss": "^8.4.5",
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6415,13 +6415,18 @@ map-obj@^4.0.0, map-obj@^4.1.0:
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a"
integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==

marked-gfm-heading-id@^3.0.4:
marked-gfm-heading-id@^3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/marked-gfm-heading-id/-/marked-gfm-heading-id-3.0.6.tgz#0d2ed4ffc221171170920b0bcb48e2fe68487f65"
integrity sha512-ot/iTTxvSJpUWv+DJ5aGVj2kxdEpsiKj6NJy6icwcdrVPHsbAE3dZ3Usk4ORt8ke2HKbw83n5Q5jNwSMuAYMSA==
dependencies:
github-slugger "^2.0.0"

marked-mangle@^1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/marked-mangle/-/marked-mangle-1.1.2.tgz#4670586f938c1d26da8c1c61bc4c12f456aa71df"
integrity sha512-+TDSCT4YiXYlSoinMLEzOY6ErY9S1ZuLMjP5OcC6ZWpre93OxCxspFwa5qZ4RIu7X7TH7fnV0CYxEmgvBz4aFg==

marked@^5.1.0:
version "5.1.2"
resolved "https://registry.yarnpkg.com/marked/-/marked-5.1.2.tgz#62b5ccfc75adf72ca3b64b2879b551d89e77677f"
Expand Down

0 comments on commit 4223647

Please sign in to comment.