Skip to content

In React pages, imported Markdown does not highlight code blocks #7698

@zzjin

Description

@zzjin

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

when write content in pages using feature Importing Markdown with tabs code inside, code is not right highlighted.

Reproducible demo

https://codesandbox.io/s/priceless-moon-5e2ptf?file=/src/pages/index.js

Steps to reproduce

import markdown mdx file with <Tabs>

Expected behavior

code blocks render colored rightly.

Actual behavior

code rendered all white/black without any highlights.

Your environment

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

Self-service

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThe issue is related to the documentation of Docusaurus

    Type

    No type
    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