Skip to content

Header ID syntax is not compatible with MDXv2's syntax for embedding expressions #9155

Open
@tats-u

Description

@tats-u

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

(WIP)

# foo {#id}

vs

1 + 1 = {1 + 1}

The language server in the MDX extension for VS Code show a syntax error on the header syntax.
I believe the current syntax using single braces is no longer approved.
Double parens ((#id)) is an alternative.

Reproducible demo

WIP

Steps to reproduce

  1. Enable the language server
  2. Add a header with its ID

Expected behavior

No errors

Actual behavior

Syntax error

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):

WIP

Self-service

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    apprenticeIssues that are good candidates to be handled by a Docusaurus apprentice / traineedomain: markdownRelated to Markdown parsing or syntax

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions