Skip to content

MDXv2 broken with remark-heading-id #1953

Closed
@Eyas

Description

@Eyas

Initial checklist

Affected packages and versions

2.0.0

Link to runnable example

No response

Steps to reproduce

  • Install & import remark-heading-id
  • in MDX remarkPlugins, add remark-heading-id
  • Try to parse MDX: ## foo {#heading}

Expected behavior

The plugin handles the {#...} extended markup syntax, and MDX parses the document normally

Actual behavior

Get error: Could not parse expression with acorn: Unexpected character '#'

It makes sense that MDX thinks that {...} syntax is inline JS, but I would have thought plugins can be used to support heading ID Markdown extended syntax.

Runtime

Node v16

Package manager

npm v8

OS

Windows

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    👀 no/externalThis makes more sense somewhere else👎 phase/noPost cannot or will not be acted on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions