@@ -20,58 +20,39 @@ export function MarkdownContent({ content }: MarkdownContentProps) {
2020 < ReactMarkdown
2121 components = { {
2222 // Style for paragraphs
23- p : ( { children, node } ) => {
24- // Paragraphs inside list items should have no margin
25- // ReactMarkdown wraps list item text in <p> tags
26- const parent = node ?. parent ;
27- const isInListItem = parent ?. type === 'listItem' ;
28-
29- return (
30- < p style = { {
31- margin : isInListItem ? '0' : '0 0 6px 0' ,
32- lineHeight : '1.5' ,
33- whiteSpace : 'pre-wrap' ,
34- wordWrap : 'break-word'
35- } } >
36- { children }
37- </ p >
38- ) ;
39- } ,
23+ p : ( { children } ) => (
24+ < p style = { {
25+ margin : '0 0 6px 0' ,
26+ lineHeight : '1.5' ,
27+ whiteSpace : 'pre-wrap' ,
28+ wordWrap : 'break-word'
29+ } } >
30+ { children }
31+ </ p >
32+ ) ,
4033 // Style for lists
41- ul : ( { children, node } ) => {
42- // Check if this list is nested inside another list
43- const parent = node ?. parent ;
44- const isNested = parent ?. type === 'listItem' ;
45-
46- return (
47- < ul style = { {
48- margin : isNested ? '0' : '0 0 6px 0' ,
49- paddingLeft : '28px' ,
50- lineHeight : '1.5' ,
51- listStyleType : 'disc' ,
52- listStylePosition : 'outside'
53- } } >
54- { children }
55- </ ul >
56- ) ;
57- } ,
58- ol : ( { children, node } ) => {
59- // Check if this list is nested inside another list
60- const parent = node ?. parent ;
61- const isNested = parent ?. type === 'listItem' ;
62-
63- return (
64- < ol style = { {
65- margin : isNested ? '0' : '0 0 6px 0' ,
66- paddingLeft : '28px' ,
67- lineHeight : '1.5' ,
68- listStyleType : 'decimal' ,
69- listStylePosition : 'outside'
70- } } >
71- { children }
72- </ ol >
73- ) ;
74- } ,
34+ ul : ( { children } ) => (
35+ < ul style = { {
36+ margin : '0 0 6px 0' ,
37+ paddingLeft : '28px' ,
38+ lineHeight : '1.5' ,
39+ listStyleType : 'disc' ,
40+ listStylePosition : 'outside'
41+ } } >
42+ { children }
43+ </ ul >
44+ ) ,
45+ ol : ( { children } ) => (
46+ < ol style = { {
47+ margin : '0 0 6px 0' ,
48+ paddingLeft : '28px' ,
49+ lineHeight : '1.5' ,
50+ listStyleType : 'decimal' ,
51+ listStylePosition : 'outside'
52+ } } >
53+ { children }
54+ </ ol >
55+ ) ,
7556 // Style for list items
7657 li : ( { children } ) => (
7758 < li style = { {
0 commit comments