Skip to content

Marked adds extra/unnecessary <p> tags to list elements #1298

@utdrmac

Description

@utdrmac

Describe the bug
When using lists with linebreak separation, Marked adds unnecessary <p> tags to list items.

To Reproduce
Using CommonMark, the following adds erroneous <p> tags around the BBB, DDD, and EEE elements.
Using MarkedDemo, the following adds <p> tags around AAA (correct) and BBB (incorrect).

## Testing

* AAA

* BBB
    * CCC
* DDD
* EEE

Expected behavior
With the above code, only AAA should have <p> element wrappers.

** Additional Example **

## Testing

* AAA
* BBB
    * CCC
* DDD

* EEE

Above, CommonMark adds around AAA, BBB, DDD, EEE.
Above, MarkedDemo adds around DDD, and EEE

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issuecategory: lists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions