@@ -16,49 +16,23 @@ export function MarkdownRenderer({
1616 < ReactMarkdown
1717 remarkPlugins = { [ remarkGfm ] }
1818 components = { {
19- h1 : ( { children } ) => (
20- < h1 className = { heading1Style } >
21- { children }
22- </ h1 >
23- ) ,
24- h2 : ( { children } ) => (
25- < h2 className = { heading2Style } >
26- { children }
27- </ h2 >
28- ) ,
29- h3 : ( { children } ) => (
30- < h3 className = { heading3Style } >
31- { children }
32- </ h3 >
33- ) ,
34- p : ( { children } ) => (
35- < p className = { paragraphStyle } >
36- { children }
37- </ p >
38- ) ,
19+ h1 : ( { children } ) => < h1 className = { heading1Style } > { children } </ h1 > ,
20+ h2 : ( { children } ) => < h2 className = { heading2Style } > { children } </ h2 > ,
21+ h3 : ( { children } ) => < h3 className = { heading3Style } > { children } </ h3 > ,
22+ p : ( { children } ) => < p className = { paragraphStyle } > { children } </ p > ,
3923 strong : ( { children } ) => (
4024 < strong className = { strongStyle } > { children } </ strong >
4125 ) ,
42- em : ( { children } ) => (
43- < em className = { emphasisStyle } > { children } </ em >
44- ) ,
26+ em : ( { children } ) => < em className = { emphasisStyle } > { children } </ em > ,
4527 ul : ( { children } ) => (
4628 < ul className = { unorderedListStyle } > { children } </ ul >
4729 ) ,
4830 ol : ( { children } ) => (
49- < ol className = { orderedListStyle } >
50- { children }
51- </ ol >
52- ) ,
53- li : ( { children } ) => (
54- < li className = { listItemStyle } >
55- { children }
56- </ li >
31+ < ol className = { orderedListStyle } > { children } </ ol >
5732 ) ,
33+ li : ( { children } ) => < li className = { listItemStyle } > { children } </ li > ,
5834 blockquote : ( { children } ) => (
59- < blockquote className = { blockquoteStyle } >
60- { children }
61- </ blockquote >
35+ < blockquote className = { blockquoteStyle } > { children } </ blockquote >
6236 ) ,
6337 code : ( { className, children, ...props } ) => {
6438 const match = / l a n g u a g e - ( \w + ) / . exec ( className || "" ) ;
@@ -76,10 +50,7 @@ export function MarkdownRenderer({
7650
7751 // Inline code
7852 return (
79- < code
80- className = { inlineCodeStyle }
81- { ...props }
82- >
53+ < code className = { inlineCodeStyle } { ...props } >
8354 { children }
8455 </ code >
8556 ) ;
@@ -96,24 +67,16 @@ export function MarkdownRenderer({
9667 ) ,
9768 table : ( { children } ) => (
9869 < div className = { tableWrapperStyle } >
99- < table className = { tableStyle } >
100- { children }
101- </ table >
70+ < table className = { tableStyle } > { children } </ table >
10271 </ div >
10372 ) ,
10473 thead : ( { children } ) => (
10574 < thead className = { tableHeadStyle } > { children } </ thead >
10675 ) ,
10776 th : ( { children } ) => (
108- < th className = { tableHeaderStyle } >
109- { children }
110- </ th >
111- ) ,
112- td : ( { children } ) => (
113- < td className = { tableCellStyle } >
114- { children }
115- </ td >
77+ < th className = { tableHeaderStyle } > { children } </ th >
11678 ) ,
79+ td : ( { children } ) => < td className = { tableCellStyle } > { children } </ td > ,
11780 hr : ( ) => < hr className = { horizontalRuleStyle } />
11881 } }
11982 >
0 commit comments