diff --git a/src/components/mdx/components/code.tsx b/src/components/mdx/components/code.tsx index 9872533d..ca3757cf 100644 --- a/src/components/mdx/components/code.tsx +++ b/src/components/mdx/components/code.tsx @@ -49,7 +49,8 @@ export const Code: React.FC< const convertSingleChildToString = child => onlyText(child).replace(/\n/g, ''); const tokenLines = Children.toArray(children).map(convertSingleChildToString); - const codeString = tokenLines.join('\n'); + + const codeString = tokenLines.filter(line => line !== '').join('\n'); const { hasCopied, onCopy } = useClipboard(codeString); diff --git a/src/components/mdx/md-contents.tsx b/src/components/mdx/md-contents.tsx index cba3ee28..2e100747 100644 --- a/src/components/mdx/md-contents.tsx +++ b/src/components/mdx/md-contents.tsx @@ -73,7 +73,6 @@ export const styleOverwrites = { }, 'p, li': { overflowWrap: 'break-word', - display: 'inline-block', ...getCapsizeStyles(16, 26), }, li: { diff --git a/src/components/toc.tsx b/src/components/toc.tsx index ad9cfe7f..f2941440 100644 --- a/src/components/toc.tsx +++ b/src/components/toc.tsx @@ -35,8 +35,6 @@ const Item = ({ const isActive = isOnScreen || _isActive; - const render = level === 2; - const adjustedLevel = level - 2; return adjustedLevel > 0 && adjustedLevel <= 2 ? (