File tree Expand file tree Collapse file tree 3 files changed +839
-6
lines changed Expand file tree Collapse file tree 3 files changed +839
-6
lines changed Original file line number Diff line number Diff line change 3838 "react-blurhash" : " ^0.3.0" ,
3939 "react-dom" : " ^18.3.1" ,
4040 "react-intl" : " ^7.1.11" ,
41+ "react-markdown" : " ^10.1.0" ,
4142 "sass" : " ^1.87.0" ,
4243 "sharp" : " ^0.34.1" ,
4344 "stripe" : " ^18.1.0" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import matter from "gray-matter"
99import { InferGetStaticPropsType } from "next"
1010import z from "zod"
1111import { RoadmapStatus } from "../components/RoadmapStatus"
12+ import Markdown from "react-markdown"
1213
1314const Roadmap = ( {
1415 features,
@@ -44,11 +45,11 @@ const Roadmap = ({
4445 < h2 className = "font-bold text-b1 mb-2 col-start-2" >
4546 { data . title }
4647 </ h2 >
47- { content . split ( "\n" ) . map ( ( line , lineIndex ) => (
48- < p key = { lineIndex } className = "col-start-2" >
49- { line }
50- </ p >
51- ) ) }
48+ < div className = "col-start-2 flex flex-col gap-1" >
49+ < Markdown allowedElements = { allowedElements } >
50+ { content }
51+ </ Markdown >
52+ </ div >
5253 </ section >
5354 ) ) }
5455 </ div >
@@ -90,6 +91,16 @@ const Roadmap = ({
9091 )
9192}
9293
94+ const allowedElements : ReadonlyArray < string > = [
95+ "p" ,
96+ "strong" ,
97+ "em" ,
98+ "a" ,
99+ "ul" ,
100+ "ol" ,
101+ "li" ,
102+ ]
103+
93104const featureSchema = z . object ( {
94105 data : z . object ( {
95106 title : z . string ( ) ,
You can’t perform that action at this time.
0 commit comments