diff options
Diffstat (limited to 'src/lib/Markdown/Section.tsx')
-rw-r--r-- | src/lib/Markdown/Section.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Markdown/Section.tsx b/src/lib/Markdown/Section.tsx index 5ce8954..1fcc46f 100644 --- a/src/lib/Markdown/Section.tsx +++ b/src/lib/Markdown/Section.tsx @@ -1,5 +1,6 @@ import React from 'react'; import ContentSection from '../ContentSection/ContentSection'; +import { Typography } from '@material-ui/core'; import Content from './Content'; import { ParserPropTypes } from './types'; @@ -30,7 +31,12 @@ const Section: React.FC<PropTypes> = ({ rawLines, level = 0 }) => { const deeperLevelIndex = rawLines.findIndex(line => line.match(`^#{${level + 1},} .*$`)); const rawContent = rawLines.splice(0, (deeperLevelIndex < 0) ? rawLines.length : deeperLevelIndex); - if (!level) return <ChildrenSections rawLines={rawLines} level={getHeaderLevel(rawLines[0])}/>; + if (!level) return ( + <> + <Typography> <Content rawLines={rawContent} /> </Typography> + <ChildrenSections rawLines={rawLines} level={getHeaderLevel(rawLines[0])}/> + </> + ) const sectionName = rawContent.splice(0, 1)[0].slice(level).trim(); const deeperLevel = getHeaderLevel(rawLines[0]); |