Skip to content

Commit

Permalink
🐛 fix: 修正 markdown 没有 lang 时会报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Mar 2, 2023
1 parent a3c907a commit 8182b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Highlighter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Highlighter: FC<HighlighterProps> = memo(
</ConfigProvider>
)}

<div className={styles.lang}>{language.toLowerCase()}</div>
{language && <div className={styles.lang}>{language.toLowerCase()}</div>}

<SyntaxHighlighter
language={language?.toLowerCase()}
Expand Down

1 comment on commit 8182b23

@vercel
Copy link

@vercel vercel bot commented on 8182b23 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.