@@ -47,9 +47,9 @@ export const Markdown: FC<MarkdownProps> = (props) => {
4747 const isExternal = href ?. startsWith ( "http" ) ;
4848
4949 return (
50- < a href = { href } target = { isExternal ? "_blank" : undefined } >
50+ < NavLink to = { href ?? "" } target = { isExternal ? "_blank" : undefined } >
5151 { children }
52- </ a >
52+ </ NavLink >
5353 ) ;
5454 } ,
5555
@@ -113,6 +113,30 @@ export const Markdown: FC<MarkdownProps> = (props) => {
113113 return < TableCell > { children } </ TableCell > ;
114114 } ,
115115
116+ h1 : ( { children } ) => {
117+ return < h1 className = "mt-8 mb-4 font-bold text-lg" > { children } </ h1 > ;
118+ } ,
119+
120+ h2 : ( { children } ) => {
121+ return < h2 className = "mt-8 mb-4" > { children } </ h2 > ;
122+ } ,
123+
124+ h3 : ( { children } ) => {
125+ return < h3 className = "mt-8 mb-4" > { children } </ h3 > ;
126+ } ,
127+
128+ h4 : ( { children } ) => {
129+ return < h4 className = "mt-8 mb-4" > { children } </ h4 > ;
130+ } ,
131+
132+ h5 : ( { children } ) => {
133+ return < h5 className = "mt-8 mb-4" > { children } </ h5 > ;
134+ } ,
135+
136+ h6 : ( { children } ) => {
137+ return < h6 className = "mt-8 mb-4" > { children } </ h6 > ;
138+ } ,
139+
116140 /**
117141 * 2025-02-10 - The RemarkGFM plugin that we use currently doesn't have
118142 * support for special alert messages like this:
@@ -239,7 +263,7 @@ function parseChildrenAsAlertContent(
239263 isValidElement ( node ) ,
240264 ) ;
241265 // biome-ignore lint/suspicious/noExplicitAny: In coder/coder this typeis difined as any
242- let parentChildren = ( mainParentNode ?. props as any ) . children ;
266+ let parentChildren = ( mainParentNode ?. props as any ) . children ;
243267 if ( typeof parentChildren === "string" ) {
244268 // Children will only be an array if the parsed text contains other
245269 // content that can be turned into HTML. If there aren't any, you
@@ -356,58 +380,3 @@ const MarkdownGfmAlert: FC<MarkdownGfmAlertProps> = ({
356380 </ div >
357381 ) ;
358382} ;
359-
360- // const markdownStyles: Interpolation<Theme> = (theme: Theme) => ({
361- // fontSize: 16,
362- // lineHeight: "24px",
363-
364- // "& h1, & h2, & h3, & h4, & h5, & h6": {
365- // marginTop: 32,
366- // marginBottom: 16,
367- // lineHeight: "1.25",
368- // },
369-
370- // "& p": {
371- // marginTop: 0,
372- // marginBottom: 16,
373- // },
374-
375- // "& p:only-child": {
376- // marginTop: 0,
377- // marginBottom: 0,
378- // },
379-
380- // "& ul, & ol": {
381- // display: "flex",
382- // flexDirection: "column",
383- // gap: 8,
384- // marginBottom: 16,
385- // },
386-
387- // "& li > ul, & li > ol": {
388- // marginTop: 16,
389- // },
390-
391- // "& li > p": {
392- // marginBottom: 0,
393- // },
394-
395- // "& .prismjs": {
396- // background: theme.palette.background.paper,
397- // borderRadius: 8,
398- // padding: "16px 24px",
399- // overflowX: "auto",
400-
401- // "& code": {
402- // color: theme.palette.text.secondary,
403- // },
404-
405- // "& .key, & .property, & .inserted, .keyword": {
406- // color: colors.teal[300],
407- // },
408-
409- // "& .deleted": {
410- // color: theme.palette.error.light,
411- // },
412- // },
413- // });
0 commit comments