Skip to content

Remark stringify throws on list nested directly within a list #269

@erquhart

Description

@erquhart

Given the following html: <ul><ul><li>test</li></ul></ul>, remark-stringify errors out - the bullet param isn't defined when listItem is called. I'm assuming this means lists simply aren't expected to contain lists as direct descendants, but it would be nice to handle this gracefully, especially since rehype-remark is capable of generating the invalid mdast.

I have a live reproduction on Runkit, where you can also view the source mapped error:
https://runkit.com/erquhart/595544cb1cba570012811573

Also, here's a pretty-print of the MDAST that's causing the error:
https://gist.github.com/erquhart/72afed6fdf14fbf92f68d0f8ea163a88

I'm looking into it, but wondering if the problem is obvious to a maintainer.

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