Skip to content

Commit

Permalink
react-markdown: Upgrade to version 8.0.7 to be compatible with rollup
Browse files Browse the repository at this point in the history
J=CLIP-1321
TEST=manual|auto

Ran `npm run test` and `npm run build` to ensure no errors
  • Loading branch information
YextSLu committed Jul 8, 2024
1 parent 4521c28 commit 2b0630d
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 659 deletions.
1 change: 1 addition & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"\\.(css|scss|less)$": "<rootDir>/tests/__utils__/style-mock.ts",
"react-markdown": "<rootDir>/node_modules/react-markdown/react-markdown.min.js"
},
"transformIgnorePatterns": ["/node_modules/(?!react-markdown)/react-markdown.min.js"],
"setupFilesAfterEnv": ["<rootDir>/tests/__setup__/setup.js"]
}
3 changes: 1 addition & 2 deletions src/components/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ReactMarkdown, { Options } from "react-markdown";
import { PluggableList } from "unified";
import remarkGfm from "remark-gfm";
import rehypeRaw from "rehype-raw";
import rehypeSanitize from "rehype-sanitize";
Expand All @@ -8,7 +7,7 @@ import { useReportAnalyticsEvent } from "../hooks/useReportAnalyticsEvent";
import { useComposedCssClasses } from "../hooks/useComposedCssClasses";

// The Remark and Rehype plugins to use in conjunction with ReactMarkdown.
const unifiedPlugins: { remark?: PluggableList; rehype: PluggableList } = {
const unifiedPlugins: { remark?: Options['remarkPlugins']; rehype: Options['rehypePlugins'] } = {
remark: [
remarkGfm, //renders Github-Flavored Markdown
],
Expand Down
Loading

0 comments on commit 2b0630d

Please sign in to comment.