Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
mdast-util-mdx-jsx@2.1.3, remark-mdx@2.3.0, remark-parse@10.0.2, remark-stringify@10.0.3
Link to runnable example
https://codesandbox.io/p/sandbox/nostalgic-cloud-fdvyzk
Steps to reproduce
Maybe introduced here?
mdast-util-mdx-jsx/lib/index.js
Line 529 in 10a502c
With default options, parse and then stringify a MDX document containing a mdxJsxTextElement
nested inside a mdxJsxFlowElement
, for example:
<div>
Lorem ipsum <span>dolor</span> sit amet
</div>
Expected behavior
Input and output should be the same
Actual behavior
Inline elements have extra whitespace in front of them
<div>
Lorem ipsum <span>dolor</span> sit amet
</div>
Affected runtime and version
node@16.20
Affected package manager and version
pnpm@8.5.0
Affected OS and version
macOS Ventura 13.1
Build and bundle tools
No response