Skip to content

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

Open
@begleynk

Description

@begleynk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions