Skip to content

tableOfContents breaks when headings have nested tags (after webpack bundling) #55

@bensmithett

Description

@bensmithett

Minimal reproduction here: https://github.com/bensmithett/mdx-error-repro
Example markdown: https://github.com/bensmithett/mdx-error-repro/blob/master/some_markdown.mdx
Example of what I'm trying to do with it: https://github.com/bensmithett/mdx-error-repro/blob/master/index.js#L19

If a heading other than a h1 has nested tags (e.g. code via backticks, italics via *) the tableOfContents expects a global MDXTag to exist.


I don't really know enough about how MDX works to make any intelligent suggestions, but...

Could this have something to do with it?

Also noticed the error actually makes it into the output bundle code so it's not just a runtime thing?

mdx_error

Thanks in advance 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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