Skip to content

Add explicit default of bulletOther, bulletOrderedOther #56

Closed
@wooorm

Description

@wooorm

Initial checklist

Problem

bulletOther, bulletOrderedOther are not set explicitly.
That generates more consistent markdown, but it means that sometimes weird things need to happen, as in, comments are injected: https://github.com/syntax-tree/mdast-util-to-markdown#optionsjoin.

Comments don’t always work: https://github.com/orgs/mdx-js/discussions/2186.

The reason this exists is because many markdown parsers don’t care about different bullets, they just treat them as one single list.

Specific to ordered lists, one of the weird new CommonMark additions was the ) marker for ordered lists. Markdown never had that. As far as I know many markdown parsers don’t support it either.

So for unordered lists, parsers that won’t support different bullets will see it as one list, which isn’t bad. For ordered lists, unsupporting parsers might not see the second list as a list at all (which is quite bad)

Solution

Use - for bulletOther, except when bullet is -, in which case, use *.

Use ) for bulletOrderedOther, except when bulletOrdered is ), in which case, use ..

Alternatives

We could keep bulletOrderedOther unchanged?

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