File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const LineNo = styled.span`
2626`
2727
2828export default function DescriptiveItem ( { section } ) {
29- console . log ( 'DescriptiveItem props: ' , section )
29+ // console.log('DescriptiveItem props: ', section)
3030 return (
3131 < div >
3232 { section . subsections . map ( secData => {
@@ -38,9 +38,9 @@ export default function DescriptiveItem({ section }) {
3838 >
3939 < h4 > { secData . name } </ h4 >
4040
41- { /* { secData.description && ( */ }
42- < p > { formatDescription ( secData ) } </ p >
43- { /* )} */ }
41+ { secData . description || secData . _rawDescriptionBlock && (
42+ < p > { formatDescription ( secData ) } </ p >
43+ ) }
4444
4545 { secData . code && (
4646 < Highlight
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ export default function TopicSection(props) {
2626 </ h3 >
2727
2828 { props . section . description && (
29- < p className = "section_description" >
30- { props . section . description }
31- </ p >
29+ < p className = "section_description" >
30+ { props . section . description }
31+ </ p >
3232 ) }
3333
3434 < ul className = "link_list" >
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ export default function formatDescription(content) {
2020 } )
2121 // console.log('descriptionBlock: ', descriptionBlock)
2222 return descriptionBlock
23- } else {
23+ } else if ( content . description ) {
2424 return content . description
25+ } else {
26+ return null
2527 }
2628}
You can’t perform that action at this time.
0 commit comments