File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,18 @@ export const MarkdownRenderer: React.FC<MarkdownRendererProps> = ({
564564 hr : ( ) => (
565565 < hr className = "markdown-hr" />
566566 ) ,
567+ // Ordered list
568+ ol : ( { children } : any ) => (
569+ < ol className = "markdown-ol" >
570+ { children }
571+ </ ol >
572+ ) ,
573+ // Unordered list
574+ ul : ( { children } : any ) => (
575+ < ul className = "markdown-ul" >
576+ { children }
577+ </ ul >
578+ ) ,
567579 // List item
568580 li : ( { children } : any ) => (
569581 < li className = "markdown-li" >
Original file line number Diff line number Diff line change 110110 border-radius : 1px ;
111111}
112112
113+ /* List Styles */
114+ .markdown-ol {
115+ margin : 0.5rem 0 ;
116+ padding-left : 1.5rem ;
117+ list-style-type : decimal;
118+ list-style-position : outside;
119+ }
120+
121+ .markdown-ul {
122+ margin : 0.5rem 0 ;
123+ padding-left : 1.5rem ;
124+ list-style-type : disc;
125+ list-style-position : outside;
126+ }
127+
113128/* List Item Styles */
114129.markdown-li {
115130 margin-bottom : 0.25rem ;
116131 color : var (--color-nord0 );
117132}
118133
134+ /* Remove extra spacing from paragraphs inside list items */
135+ .markdown-ol li > p ,
136+ .markdown-ul li > p ,
137+ .markdown-li > p {
138+ margin-top : 0 !important ;
139+ margin-bottom : 0 !important ;
140+ }
141+
142+ /* Preserve spacing only between multiple paragraphs within same list item */
143+ .markdown-ol li > p + p ,
144+ .markdown-ul li > p + p ,
145+ .markdown-li > p + p {
146+ margin-top : 0.5rem !important ;
147+ }
148+
119149/* Blockquote Styles */
120150.markdown-blockquote {
121151 border-left : 4px solid # d1d5db ;
You can’t perform that action at this time.
0 commit comments