We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb5ebf5 commit 79d59c5Copy full SHA for 79d59c5
src/components/Markdown.tsx
@@ -57,6 +57,7 @@ export function Markdown({ children, className = "" }: Props) {
57
<ReactMarkdown
58
components={{
59
code({ className, children, ...props }) {
60
+ if (!children) return null;
61
const detectedLanguage =
62
hljs.highlightAuto(children, LANGUAGES_SUBSET_DETECTION).language ??
63
"plaintext";
0 commit comments