Skip to content

Parser panic on link-reference-like list item followed by blank tab line #1095

Closed

Description

@jcreinhold

pulldown-cmark 0.13.3 panics while iterating the parser for this 11-byte Markdown input:

- [n]:Z\r\n\t\t

Minimal Rust reproducer:

use pulldown_cmark::{Options, Parser};

fn main() {
    let s = "- [n]:Z\r\n\t\t";
    let parser = Parser::new_ext(s, Options::all());
    for _ in parser {}
}

Observed panic in a fuzz campaign through mdwright:

thread panicked at .../pulldown-cmark-0.13.3/src/parse.rs:2367: called `Option::unwrap()` on a `None` value

The same panic reproduces when collecting events directly from Parser::new_ext(..., Options::all()), so it appears independent of mdwright's formatter/linter logic.

Expected: parsing arbitrary Markdown input should not panic; this input should produce some event stream or be handled internally without unwinding.

Activity

  1. notriddle commented on May 26, 2026

    @notriddle
    Collaborator

    Fixed by #1096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions