File tree Expand file tree Collapse file tree 6 files changed +189
-5
lines changed
Expand file tree Collapse file tree 6 files changed +189
-5
lines changed Original file line number Diff line number Diff line change 4444 "react-markdown" : " ^10.1.0" ,
4545 "react-relay" : " ^18.2.0" ,
4646 "react-router" : " ^7.1.5" ,
47+ "rehype-raw" : " ^7.0.0" ,
4748 "relay-runtime" : " ^18.2.0" ,
4849 "remark-gfm" : " ^4.0.1" ,
4950 "tailwind-merge" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414import { Progress } from "@/components/ui/progress" ;
1515import ReactMarkdown from "react-markdown" ;
1616import remarkGfm from "remark-gfm" ;
17+ import rehypeRaw from 'rehype-raw' ;
1718
1819type Document = {
1920 policy_version_id : string ;
@@ -241,7 +242,8 @@ export default function SigningRequestsPage() {
241242 < CardContent >
242243 < div className = "border rounded-md p-4 min-h-[400px] bg-muted/20" >
243244 < div className = "prose prose-olive max-w-none" >
244- < ReactMarkdown remarkPlugins = { [ remarkGfm ] } >
245+ < ReactMarkdown remarkPlugins = { [ remarkGfm ] } rehypePlugins = { [ rehypeRaw ] }
246+ >
245247 { currentDoc . content }
246248 </ ReactMarkdown >
247249 </ div >
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ import { MeasureViewRisksQuery$data } from "./__generated__/MeasureViewRisksQuer
108108import { MeasureViewRisksQuery } from "./__generated__/MeasureViewRisksQuery.graphql" ;
109109import { MeasureViewDeleteMeasureMutation } from "./__generated__/MeasureViewDeleteMeasureMutation.graphql" ;
110110import remarkGfm from "remark-gfm" ;
111+ import rehypeRaw from "rehype-raw" ;
111112
112113// Function to format ISO8601 duration to human-readable format
113114const formatDuration = ( isoDuration : string ) : string => {
@@ -2201,7 +2202,7 @@ function MeasureViewContent({
22012202 < Card className = "mt-4" >
22022203 < CardContent className = "pt-6" >
22032204 < div className = "prose prose-gray prose-sm md:prose-base text-secondary max-w-3xl" >
2204- < ReactMarkdown remarkPlugins = { [ remarkGfm ] } >
2205+ < ReactMarkdown remarkPlugins = { [ remarkGfm ] } rehypePlugins = { [ rehypeRaw ] } >
22052206 { data . measure . description }
22062207 </ ReactMarkdown >
22072208 </ div >
@@ -2831,7 +2832,7 @@ function MeasureViewContent({
28312832 Description
28322833 </ h3 >
28332834 < div className = "prose prose-gray prose-sm max-w-none text-primary bg-invert-bg p-4 rounded-md border border-mid-b" >
2834- < ReactMarkdown remarkPlugins = { [ remarkGfm ] } >
2835+ < ReactMarkdown remarkPlugins = { [ remarkGfm ] } rehypePlugins = { [ rehypeRaw ] } >
28352836 { selectedTask . description }
28362837 </ ReactMarkdown >
28372838 </ div >
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import {
4242} from "@/components/ui/dialog" ;
4343import { SignaturesModal } from "./SignaturesModal" ;
4444import { VersionHistoryModal } from "./VersionHistoryModal" ;
45+ import rehypeRaw from "rehype-raw" ;
4546
4647const policyViewQuery = graphql `
4748 query ShowPolicyViewQuery($policyId: ID!) {
@@ -376,7 +377,7 @@ function ShowPolicyContent({
376377 ) }
377378
378379 < div className = "prose prose-olive max-w-none" >
379- < ReactMarkdown remarkPlugins = { [ remarkGfm ] } >
380+ < ReactMarkdown remarkPlugins = { [ remarkGfm ] } rehypePlugins = { [ rehypeRaw ] } >
380381 { latestVersionNode . content || "No content available" }
381382 </ ReactMarkdown >
382383 </ div >
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import ReactMarkdown from "react-markdown";
77import { graphql , useFragment } from "react-relay" ;
88import type { VersionHistoryModal_policyVersions$key } from "./__generated__/VersionHistoryModal_policyVersions.graphql" ;
99import remarkGfm from "remark-gfm" ;
10+ import rehypeRaw from "rehype-raw" ;
1011
1112export const policyVersionsFragment = graphql `
1213 fragment VersionHistoryModal_policyVersions on Policy {
@@ -133,7 +134,7 @@ export function VersionHistoryModal({
133134
134135 < div className = "prose prose-olive max-w-none" >
135136 { selectedVersion && (
136- < ReactMarkdown remarkPlugins = { [ remarkGfm ] } >
137+ < ReactMarkdown remarkPlugins = { [ remarkGfm ] } rehypePlugins = { [ rehypeRaw ] } >
137138 { versions . find ( ( v ) => v . version === selectedVersion )
138139 ?. content || "No content available" }
139140 </ ReactMarkdown >
You can’t perform that action at this time.
0 commit comments