Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump react-markdown from 8.0.7 to 9.0.1 #126

Merged
merged 9 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/suite-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"react-hover-observer": "2.1.1",
"react-i18next": "14.0.1",
"react-json-tree": "patch:react-json-tree@npm:0.15.1#../../patches/react-json-tree.patch",
"react-markdown": "8.0.7",
"react-markdown": "9.0.1",
"react-monaco-editor": "0.56.2",
"react-mosaic-component": "6.1.0",
"react-refresh-typescript": "2.0.9",
Expand Down
3 changes: 1 addition & 2 deletions packages/suite-base/src/components/PanelOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import {
buttonClasses,
} from "@mui/material";
import * as _ from "lodash-es";
import { forwardRef } from "react";
import { ReactElement } from "react-markdown/lib/react-markdown";
import { forwardRef, ReactElement } from "react";
import tc from "tinycolor2";
import { makeStyles } from "tss-react/mui";

Expand Down
5 changes: 3 additions & 2 deletions packages/suite-base/src/components/TextContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import { Link } from "@mui/material";
import { CSSProperties, PropsWithChildren, useCallback, useContext } from "react";
import Markdown from "react-markdown";
import { PluggableList } from "react-markdown/lib";
import rehypeRaw from "rehype-raw";
import { makeStyles } from "tss-react/mui";

Expand Down Expand Up @@ -168,7 +169,7 @@ export default function TextContent(
const handleLink = useContext(LinkHandlerContext);

const linkRenderer = useCallback(
(linkProps: { href?: string; children: React.ReactNode }) => {
(linkProps: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {
return (
<Link
color="primary"
Expand All @@ -192,7 +193,7 @@ export default function TextContent(
<div className={classes.root} style={style}>
{typeof children === "string" ? (
<Markdown
rehypePlugins={allowMarkdownHtml === true ? [rehypeRaw] : []}
rehypePlugins={allowMarkdownHtml === true ? ([rehypeRaw] as PluggableList) : []}
components={{ a: linkRenderer }}
>
{children}
Expand Down
Loading
Loading