Merge pull request #605 from eltociear/patch-2

chore: update CodeBlock.tsx
This commit is contained in:
Matt Rubens 2025-01-27 15:35:21 -05:00 committed by GitHub
commit 86d4a10a9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,7 +120,7 @@ const CodeBlock = memo(({ source, forceWrap = false }: CodeBlockProps) => {
if (!node.lang) {
node.lang = "javascript"
} else if (node.lang.includes(".")) {
// if the langauge is a file, get the extension
// if the language is a file, get the extension
node.lang = node.lang.split(".").slice(-1)[0]
}
})