Skip to content

Add Settings option to allow custom heading ids (GitHub, kramdom, Docusaurus, etc) #525

@thadguidry

Description

@thadguidry

Initial checklist

Problem

Environment

Windows 11
VSCode Insiders 1.109.0
Docusaurus 3.9.1
MDX for Visual Studio Code:

  • Identifier: unifiedjs.vscode-mdx
  • Version: 1.8.17

Summary

When working with Docusaurus documents in MDX and using the MDX extension for VSCode, I see Acorn parsing the { } curly braces as expressions and giving warnings in VSCode.

snippet from overview.mdx file using Docusaurus v3.9.1
Image

I did notice a fixture note about a directive that hints at Acorn parsing anything between curly braces as an expression. https://github.com/mdx-js/mdx-analyzer/blob/main/fixtures/directive/directive.mdx

I would be nice to have a MDX Analyzer setting for VSCode extension that would be something like this:

mdx.validate.ignoreCustomHeaderIds : | ignore | hint | warning | error |

This setting would allow disabling Acorn parsing of anything between { } curly braces.

Current solutions

There might be some hidden setting for the micromark plugin that I am not aware of how to control?

Proposed solutions

I am unaware of any setting or adjustment I could make to the MDX for Visual Studio Code extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions