Describe the bug
CodeBlock renders incorrect indentation for MDX string children wrapped in {...}.
To Reproduce
- Render this MDX:
<CodeBlock filename="example.ts" language="ts">
{`import {
a,
b,
} from 'pkg';
async function main() {
console.log('hello');
}`}
</CodeBlock>
- Open the rendered page.
- Observe the indentation of the lines inside the code block.
Expected behavior
The code should render with the same indentation as written in the string:
import {
a,
b,
} from 'pkg';
async function main() {
console.log('hello');
}
Screenshots

Device:
- OS: macOS
- Browser: Chrome
- Version: latest
Additional context
Raw code inside <CodeBlock>...</CodeBlock> causes MDX parsing issues, so wrapping the code in {...} is required. The source string indentation is correct, but the rendered output still appears mis-indented.
Describe the bug
CodeBlockrenders incorrect indentation for MDX string children wrapped in{...}.To Reproduce
Expected behavior
The code should render with the same indentation as written in the string:
Screenshots

Device:
Additional context
Raw code inside
<CodeBlock>...</CodeBlock>causes MDX parsing issues, so wrapping the code in{...}is required. The source string indentation is correct, but the rendered output still appears mis-indented.