fix: using old versions of marked (#15151)
This commit is contained in:
parent
0a78aa4aed
commit
8428ae506a
|
|
@ -78,7 +78,7 @@
|
|||
"loglevel": "^1.7.1",
|
||||
"lottie-web": "^5.7.4",
|
||||
"mammoth": "^1.4.19",
|
||||
"marked": "^4.0.17",
|
||||
"marked": "^2.0.0",
|
||||
"memoize-one": "^5.2.1",
|
||||
"micro-memoize": "^4.0.10",
|
||||
"moment": "2.29.3",
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
"@types/js-beautify": "^1.13.2",
|
||||
"@types/jshint": "^2.12.0",
|
||||
"@types/lodash": "^4.14.120",
|
||||
"@types/marked": "^4.0.3",
|
||||
"@types/marked": "^1.2.2",
|
||||
"@types/moment-timezone": "^0.5.10",
|
||||
"@types/nanoid": "^2.0.0",
|
||||
"@types/node": "^10.12.18",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { HelpBaseURL } from "constants/HelpConstants";
|
||||
import { algoliaHighlightTag } from "./utils";
|
||||
import log from "loglevel";
|
||||
|
||||
const { marked } = require("marked");
|
||||
import marked, { Token } from "marked";
|
||||
|
||||
/**
|
||||
* @param {String} HTML representing a single element
|
||||
|
|
@ -123,8 +122,8 @@ const parseMarkdown = (value: string) => {
|
|||
value = replaceHintTagsWithCode(stripDescriptionMarkdown(value));
|
||||
|
||||
marked.use({
|
||||
walkTokens(token: any) {
|
||||
const currentToken = token;
|
||||
walkTokens(token: unknown) {
|
||||
const currentToken = token as Token;
|
||||
if ("type" in currentToken && currentToken.type === "link") {
|
||||
let href = currentToken.href;
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -3057,10 +3057,10 @@
|
|||
version "4.14.169"
|
||||
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.169.tgz"
|
||||
|
||||
"@types/marked@^4.0.3":
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.3.tgz#2098f4a77adaba9ce881c9e0b6baf29116e5acc4"
|
||||
integrity sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg==
|
||||
"@types/marked@^1.2.2":
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-1.2.2.tgz#1f858a0e690247ecf3b2eef576f98f86e8d960d4"
|
||||
integrity sha512-wLfw1hnuuDYrFz97IzJja0pdVsC0oedtS4QsKH1/inyW9qkLQbXgMUqEQT0MVtUBx3twjWeInUfjQbhBVLECXw==
|
||||
|
||||
"@types/mime@^1":
|
||||
version "1.3.2"
|
||||
|
|
@ -10476,10 +10476,10 @@ map-obj@^4.0.0:
|
|||
version "4.2.1"
|
||||
resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz"
|
||||
|
||||
marked@^4.0.17:
|
||||
version "4.0.17"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.17.tgz#1186193d85bb7882159cdcfc57d1dfccaffb3fe9"
|
||||
integrity sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==
|
||||
marked@^2.0.0:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753"
|
||||
integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==
|
||||
|
||||
marker-clusterer-plus@^2.1.4:
|
||||
version "2.1.4"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user