Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic with setext heading containing text and JSX tag without matching close #139

Open
begleynk opened this issue Sep 19, 2024 · 1 comment

Comments

@begleynk
Copy link
Contributor

Found a panic with this very specific input:

Hi <>
=====

Resulting panic:

thread 'main' panicked at src/to_mdast.rs:1249:9:
internal error: entered unreachable code: expected heading on stack
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Requires parsing with MDX options:

    println!(
        "{:?}",
        markdown::to_mdast(
            "Hi <>\n======",
            &markdown::ParseOptions::mdx()
        )?
    );

I checked back to alpha 16 and the crash is still there, so doesn't look like this is a recent regression.

I can try to take a look into what's going on here, but likely can't get to it until next week earliest.

@ChristianMurphy
Copy link
Collaborator

Thanks @begleynk!
That does indeed seem to be something worth looking into.
It could potentially be related to #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants