Skip to content

The mdx-code-block is not compatible with Windows. #9988

Description

@wyy0512

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Placing JSX in mdx-code-block works fine on Linux, but when developing on Windows, it directly displays the code block instead.

Reproducible demo

No response

Steps to reproduce

Placing a piece of JSX inside mdx-code-block and running it in a Windows environment can reproduce the issue.

Expected behavior

The card list has been rendered.
image

Actual behavior

The code block is presented.
image

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.1.1
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):chrome, Node.js 20.9.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 10

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed: duplicateThis issue or pull request already exists in another issue or pull request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions