diff --git a/.changeset/itchy-frogs-shop.md b/.changeset/itchy-frogs-shop.md new file mode 100644 index 0000000000..4a634dc79b --- /dev/null +++ b/.changeset/itchy-frogs-shop.md @@ -0,0 +1,5 @@ +--- +"nextra": patch +--- + +add icons for ```javascript and ```typescript langs diff --git a/packages/nextra/src/client/hocs/with-icons.tsx b/packages/nextra/src/client/hocs/with-icons.tsx index 95ec4d3f8a..384bf6cc92 100644 --- a/packages/nextra/src/client/hocs/with-icons.tsx +++ b/packages/nextra/src/client/hocs/with-icons.tsx @@ -25,10 +25,12 @@ import type { PreProps } from '../mdx-components/pre/index.js' function getIcon(language: string) { switch (language) { + case 'javascript': case 'js': case 'mjs': case 'cjs': return JavaScriptIcon + case 'typescript': case 'ts': case 'mts': case 'cts':